-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Roughly approximate R packages. Changes from old master branch.
- Loading branch information
Showing
43 changed files
with
476 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,6 @@ | |
!DESCRIPTION | ||
!NAMESPACE | ||
!CMakeLists.txt | ||
!cmake/FindR.cmake | ||
!Makefile | ||
!Makevars | ||
!*/cmake/FindR.cmake |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
cmake_minimum_required(VERSION 3.7) | ||
project(ufos) | ||
|
||
SET(EX_PLATFORM 64) | ||
SET(EX_PLATFORM_NAME "x64") | ||
|
||
add_definitions(-Wall -O2 -D__UFOs_CoreDev__) | ||
#-Wall -g | ||
|
||
set(CMAKE_CXX_STANDARD 11) | ||
|
||
#file(GLOB_RECURSE SRC "src/*.c" "src/*.h") | ||
|
||
set(CORE_SRC src/mappedMemory/userfaultCore.h | ||
src/mappedMemory/sparseList.h | ||
src/mappedMemory/sparseList.c | ||
src/mappedMemory/userfaultCore.c | ||
src/mappedMemory/userFaultCoreInternal.h | ||
src/mappedMemory/userfaultGettersSetters.c) | ||
|
||
set(UNSTDLIB_SRC | ||
src/unstdLib/errors.h | ||
src/unstdLib/math.h | ||
src/unstdLib/vars.h) | ||
|
||
set(R_SRC src/ufos.h | ||
src/ufos.c | ||
src/init.c) | ||
|
||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") | ||
|
||
find_package(R REQUIRED) | ||
message("R libraries: ${R_LIBRARIES}") | ||
message("R include dirs: ${R_INCLUDE_DIR}") | ||
|
||
find_package (Threads) | ||
|
||
add_library(ufos SHARED ${CORE_SRC} ${R_SRC} ${UNSTDLIB_SRC}) | ||
include_directories(ufos ${R_INCLUDE_DIR}) | ||
target_link_libraries(ufos ${R_LIBRARIES}) | ||
|
||
add_executable(ufoTest ${CORE_SRC} ${UNSTDLIB_SRC} src/mappedMemory/ufoTest.c) | ||
target_link_libraries(ufoTest ${CMAKE_THREAD_LIBS_INIT}) | ||
|
||
add_executable(strideTest ${CORE_SRC} src/mappedMemory/stride.c) | ||
target_link_libraries(strideTest ${CMAKE_THREAD_LIBS_INIT}) | ||
|
||
add_executable(sparseListTest ${CORE_SRC} src/mappedMemory/sparseListTest.c) | ||
target_link_libraries(sparseListTest ${CMAKE_THREAD_LIBS_INIT}) | ||
|
||
add_executable(userfaultSpeed ${CORE_SRC} src/mappedMemory/userfaultSpeed.c) | ||
target_link_libraries(userfaultSpeed ${CMAKE_THREAD_LIBS_INIT}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Package: ufos | ||
Type: Package | ||
Title: UserFault Objects: framework for implementing of custom objects | ||
masquerading as plain R objects via user faults | ||
Description: Experiments in making custom objects with complex behavior | ||
appearing as ordinary R data structures (data.frames, matrices, | ||
etc.) to both R functions and C functions. This uses user faults | ||
(memory faults) to capture memory accesses and override them. | ||
Version: 0.1.0 | ||
Authors@R: c(person(given = "Colette", family = "Kerr", role = c("aut"), | ||
email = "[email protected]"), | ||
person(given = "Konrad", family = "Siek", role = c("aut", "cre"), | ||
email = "[email protected]")) | ||
Maintainer: Konrad Siek <[email protected]> | ||
License: GPL-2 | GPL-3 | ||
Encoding: UTF-8 | ||
LazyData: true | ||
NeedsCompilation: yes | ||
Suggests: ufovectors | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Empty. | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
PKG_CPPFLAGS = -pthread -D__UFOs_CoreDev__ | ||
PKG_LIBS = -pthread -D__UFOs_CoreDev__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "ufos.h" | ||
|
||
#include <R_ext/Rdynload.h> | ||
#include <R_ext/Visibility.h> | ||
|
||
// List of functions provided by the package. | ||
static const R_CallMethodDef CallEntries[] = { | ||
// Terminates the function list. Necessary. | ||
{NULL, NULL, 0} | ||
}; | ||
|
||
// Initializes the package and registers the routines with the Rdynload | ||
// library. Name follows the pattern: R_init_<package_name> | ||
void attribute_visible R_init_ufos(DllInfo *dll) { | ||
//InitUFOAltRepClass(dll); | ||
//R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); | ||
//R_useDynamicSymbols(dll, FALSE); | ||
//R_forceSymbols(dll, TRUE); | ||
|
||
R_RegisterCCallable("ufos", "ufo_initialize", (DL_FUNC) &ufo_initialize); | ||
R_RegisterCCallable("ufos", "ufo_new", (DL_FUNC) &ufo_new); | ||
R_RegisterCCallable("ufos", "ufo_shutdown", (DL_FUNC) &ufo_shutdown); | ||
} | ||
|
||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
project(ufovectors) | ||
cmake_minimum_required(VERSION 2.8.7) | ||
|
||
SET(EX_PLATFORM 64) | ||
SET(EX_PLATFORM_NAME "x64") | ||
|
||
add_definitions(-Wall -O2) | ||
# -Wall -g | ||
|
||
file(GLOB_RECURSE SRC "src/*.c" "src/*.h") | ||
|
||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") | ||
|
||
find_package(R REQUIRED) | ||
message("R libraries: ${R_LIBRARIES}") | ||
message("R include dirs: ${R_INCLUDE_DIR}") | ||
|
||
add_library(ufovectors SHARED ${SRC}) | ||
include_directories(ufovectors ${R_INCLUDE_DIR}) | ||
target_link_libraries(ufovectors ${R_LIBRARIES}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Package: ufovectors | ||
Type: Package | ||
Title: Implementation of R vectors using UserFault Objects | ||
Description: Example implementation of R vectors using UserFault Objects to | ||
materialize data on demand from file sources. | ||
Version: 0.1.0 | ||
Authors@R: c(person(given = "Colette", family = "Kerr", role = c("aut"), | ||
email = "[email protected]"), | ||
person(given = "Konrad", family = "Siek", role = c("aut", "cre"), | ||
email = "[email protected]")) | ||
Maintainer: Konrad Siek <[email protected]> | ||
License: GPL-2 | GPL-3 | ||
Encoding: UTF-8 | ||
LazyData: true | ||
Depends: ufos | ||
LinkingTo: ufos | ||
NeedsCompilation: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
useDynLib(ufovectors, .registration = TRUE, .fixes = "") | ||
|
||
export(ufo_integer_bin) | ||
#export(ufo_numeric_bin) | ||
#export(ufo_character_bin) | ||
#export(ufo_complex_bin) | ||
#export(ufo_logical_bin) | ||
|
||
export(ufo_init) | ||
export(ufo_shutdown) |
Oops, something went wrong.