Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
94413af
Add access_at and get_interface_ptr_at for nLists, allowing generic u…
perrydv Jul 17, 2026
395888c
Updates to RuntimeFlatView. Add KnownProxy (TBD).
perrydv Jul 21, 2026
b9b000f
Make overload dispatch go through symbols in general. Make type decl'…
perrydv Jul 22, 2026
3179206
fix symbolNC. fix use of scoping for evaluating types given in cppLit…
perrydv Jul 22, 2026
3154fb7
fix updating of overloadDefs during process_inherit
perrydv Jul 22, 2026
984fb3b
fix project_env = NULL proxy case in register_known_nClass
perrydv Jul 22, 2026
7b7a536
add make_scalarNodePtr as a utility for nimble2
perrydv Jul 23, 2026
c4385e7
Add support for an empty StridedTensorMap that can be rebased to new …
perrydv Jul 23, 2026
d30d7d8
update names liek make_scalarNodePtr to more general make_scalarFieldPtr
perrydv Jul 23, 2026
f4c4b40
support for nCpp to work within one line if a types$return element is…
perrydv Jul 28, 2026
a4ebf3d
Support RcppObject type. Update nGet for known_nClasses. Support nLi…
perrydv Aug 4, 2026
ece5320
Support `nClass(myclass(), interface = "generic")` type declaration a…
perrydv Aug 5, 2026
59c81b9
Member-specific control over generic vs full interface. New interface…
perrydv Aug 6, 2026
a4e5ad7
Tests for member control over interface type. Make various ls() uses …
perrydv Aug 11, 2026
c4f4e0c
Extent RuntimeFlatView and RuntimeFlatViewGroup to copy between two s…
perrydv Aug 14, 2026
cc91d9b
support compileInfo$abstract = TRUE in an nClass method. Catch lack o…
perrydv Aug 26, 2026
5accdb0
Add an option to control warnings from nClass
perrydv Aug 28, 2026
a533bc1
remove nimbleModel and compileNimble from testing and prototypes (mov…
perrydv Aug 28, 2026
64eec8d
remove compileNimble tests (moved to nimble2)
perrydv Aug 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions .github/workflows/test-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,10 @@ jobs:
- uses: actions/checkout@v4
- name: SessionInfo
run: R -q -e 'sessionInfo()'
- name: Install nimbleModel
run: R -q -e 'remotes::install_github("https://github.com/perrydv/nimbleModel", subdir="nimbleModel", auth_token=Sys.getenv("GITHUB_TOKEN_NIMBLEMODEL"))'
env:
GITHUB_TOKEN_NIMBLEMODEL: ${{ secrets.GH_NM_PAT }}
- name: Package Dependencies
run: R -q -e 'remotes::install_deps("nCompiler", dependencies=TRUE)'
- name: Install inline
run: R -q -e 'remotes::install_cran(c("inline", "nimble"))'
run: R -q -e 'remotes::install_cran(c("inline"))'
- name: Build Package
run: |
R CMD build nCompiler
Expand Down Expand Up @@ -95,22 +91,17 @@ jobs:
#- name: System Dependencies
# # can be used to install e.g. cmake or other build dependencies
# run: apt update -qq && apt install --yes --no-install-recommends cmake git
- name: Install nimbleModel
run: R -q -e 'remotes::install_github("https://github.com/perrydv/nimbleModel", subdir="nimbleModel", auth_token=Sys.getenv("GITHUB_TOKEN_NIMBLEMODEL"))'
env:
GITHUB_TOKEN_NIMBLEMODEL: ${{ secrets.GH_NM_PAT }}
- name: Package Dependencies
run: R -q -e 'remotes::install_deps("nCompiler", dependencies=TRUE)'
- name: Install inline
run: R -q -e 'remotes::install_cran(c("inline", "nimble"))'
run: R -q -e 'remotes::install_cran(c("inline"))'
- name: Build Package
run: |
R CMD build nCompiler
R CMD INSTALL --install-tests nCompiler_*.tar.gz
- name: Run nCompile and other tests
run: |
library(nCompiler)
# testthat::test_dir("nCompiler/tests/testthat/nimble_tests", reporter = "summary")
testthat::test_dir("nCompiler/tests/testthat/nClass_tests", reporter = "summary")
testthat::test_dir("nCompiler/tests/testthat/types_tests", reporter = "summary")
testthat::test_dir("nCompiler/tests/testthat/serialization_tests", reporter = "summary")
Expand Down Expand Up @@ -157,7 +148,7 @@ jobs:
- name: Package Dependencies
run: R -q -e 'remotes::install_deps("nCompiler", dependencies=TRUE)'
- name: Install inline
run: R -q -e 'remotes::install_cran(c("inline", "nimble"))'
run: R -q -e 'remotes::install_cran(c("inline"))'
- name: Build Package
run: |
R CMD build nCompiler
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ sketches/
.positai
# devtools::load_all() convenience symlink (inst/include -> include)
nCompiler/include
# macOS Finder metadata
.DS_Store
Binary file removed UserManual/.DS_Store
Binary file not shown.
Binary file removed nCompiler/.DS_Store
Binary file not shown.
1 change: 0 additions & 1 deletion nCompiler/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Collate:
compile_simpleIntermediates.R
compile_simpleTransformations.R
compile_finalTransformations.R
compileNimble.R
cppDefs_core.R
cppDefs_utils.R
cppDefs_ADutils.R
Expand Down
12 changes: 8 additions & 4 deletions nCompiler/NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export(NFinternals)
export(OptimControlList)
export(OptimResultList)
export(SVDDecomp)
export(type2cpp)
export(asDense)
export(asSparse)
export(build_compiled_nClass)
Expand All @@ -34,15 +33,14 @@ export(createBlockRefInfoIntoC)
export(createRef)
export(createRefInfoIntoC)
export(cube)
export(deregisterOpDef)
export(documentNClass)
export(documentNFunction)
export(dcar_normal)
export(dcar_proper)
export(dcat)
export(dconstraint)
export(ddexp)
export(ddirch)
export(deregisterOpDef)
export(deregisterTypeDeclaration)
export(dexp_nimble)
export(dinvwish_chol)
export(dflat)
Expand All @@ -55,6 +53,8 @@ export(dmnorm_chol)
export(dmnorm_inv_ld)
export(dmulti)
export(dmvt_chol)
export(documentNClass)
export(documentNFunction)
export(dt_nonstandard)
export(dwish_chol)
export(erasePackage)
Expand All @@ -64,6 +64,7 @@ export(get_nCompile_types)
export(get_nOption)
export(icloglog)
export(ilogit)
export(interface_names)
export(iprobit)
export(is.loadedObjectEnv)
export(isCNC)
Expand Down Expand Up @@ -143,6 +144,7 @@ export(rconstraint)
export(rdexp)
export(rdirch)
export(registerOpDef)
export(registerTypeDeclaration)
export(rexp_nimble)
export(rflat)
export(rhalfflat)
Expand All @@ -165,6 +167,8 @@ export(square)
export(test_predefined)
export(to_full_interface)
export(to_generic_interface)
export(type2cpp)
export(type2symbol)
export(value)
export(writeCode)
export(writeCpp_nCompiler)
Expand Down
3 changes: 2 additions & 1 deletion nCompiler/R/NC.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ nClass <- function(classname,
# accessor specifier, typically "public", e.g. "public some_class".
# Similarly, template arguments (include CRTP) should be in the text explicitly.
# needed_units: list of needed nClasses and nFunctions to include, by name or object
# createFromR: Default TRUE, whether to enable creation of objects from R.
#
# packageNames: can be a vector or list of two names, possibly named by "uncompiled" and "compiled",
# and taken in that order if unnamed.
Expand Down Expand Up @@ -184,7 +185,7 @@ nClass <- function(classname,
init_body_text <- deparse(body(Rpublic[['initialize']]))
has_super_init <- any(grepl("super\\$initialize", init_body_text))
has_init_cpublic <- any(grepl("initialize_Cpublic", init_body_text))
if(!has_super_init && !has_init_cpublic)
if(!has_super_init && !has_init_cpublic && isTRUE(get_nOption("NCwarn")))
warning(
"The Rpublic 'initialize' function does not call 'super$initialize()' or ",
"'initialize_Cpublic()'. Without one of these, the Cpublic component will not ",
Expand Down
8 changes: 7 additions & 1 deletion nCompiler/R/NC_FullCompiledInterface.R
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,15 @@ make_compiled_Cpub_class_code <- function(NCgenerator,
if(is.null(newCobjFun))
stop("Cannot create a nClass full interface object without a newCobjFun or a CppObj argument.")
CppObj <- newCobjFun()
} else {
if(isCNC(CppObj)) {
CppObj <- CppObj$private$Cpublic_obj$private$CppObj
}
}
if(!nCompiler:::is.loadedObjectEnv(CppObj))
stop("in initializeCpp: CppObj should be a loadedObjectEnv")
private$CppObj <- CppObj
private$DLLenv <- `:::`("nCompiler", "get_DLLenv")(CppObj) # workaround static code scanning for nCompiler:::get_DLLenv(CppObj)
private$DLLenv <- nCompiler:::get_DLLenv(CppObj)
},
list(
NEWCOBJFUN = if(package) as.name(newCobjFun)
Expand Down
Loading
Loading