Skip to content

Commit dc9bc7b

Browse files
committed
Squashed commit of the following:
commit bf40eeb Author: perrydv <perrydv@users.noreply.github.com> Date: Fri Sep 19 17:18:53 2025 +0200 still working on modelBase_nClass situation commit 23f5faa Author: perrydv <perrydv@users.noreply.github.com> Date: Fri Sep 19 09:38:27 2025 +0200 Make inherit be quoted and defer handling until nCompile commit a5e954f Author: perrydv <perrydv@users.noreply.github.com> Date: Sat Sep 13 17:03:27 2025 +0200 Make "virtual" keyword for methods be generated correctly. commit 8eff688 Author: perrydv <perrydv@users.noreply.github.com> Date: Sat Sep 13 08:53:48 2025 +0200 update test-nimbleModel variable check. C++ does not initialize to 0s so check length and dim only. commit 107c79f Author: perrydv <perrydv@users.noreply.github.com> Date: Sat Sep 13 08:45:25 2025 +0200 extract model nodeFxns using generic interface. make dynamic casting with generic interface work. commit f0a3b87 Author: perrydv <perrydv@users.noreply.github.com> Date: Wed Sep 10 14:52:34 2025 +0200 tests and cleanup for user-defined opDefs commit f4a47b9 Author: perrydv <perrydv@users.noreply.github.com> Date: Wed Sep 10 12:32:46 2025 +0200 move recurse_normalizeCalls after arg ordering and extracting compile-time args commit 42f026e Author: perrydv <perrydv@users.noreply.github.com> Date: Wed Sep 10 11:56:45 2025 +0200 Establish cachedOpInfo in code$auxEnv so that user-defined opDefs can occur at various levels.
1 parent da4444a commit dc9bc7b

26 files changed

Lines changed: 617 additions & 351 deletions

.github/workflows/test-all.yaml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,38 @@ on:
77
run_tests:
88
description: 'Run all tests'
99
required: true
10+
default: 'no'
11+
run_nCompile:
12+
description: 'Run nCompile tests'
13+
required: false
14+
default: 'yes'
15+
run_nClass:
16+
description: 'Run nClass tests'
17+
required: false
1018
default: 'yes'
19+
run_math:
20+
description: 'Run math tests'
21+
required: false
22+
default: 'no'
1123
run_tensorOps:
1224
description: 'Run tensorOps tests'
1325
required: false
14-
default: 'yes'
26+
default: 'no'
1527

1628
jobs:
1729
test-nCompile:
1830
runs-on: ubuntu-latest
1931
container:
2032
image: rocker/r2u:latest
21-
if: github.event.inputs.run_tests == 'yes'
33+
if: github.event.inputs.run_tests == 'yes' || github.event.inputs.run_nCompile == 'yes'
2234
steps:
2335
- uses: actions/checkout@v3
2436
- name: SessionInfo
2537
run: R -q -e 'sessionInfo()'
2638
- name: Package Dependencies
2739
run: R -q -e 'remotes::install_deps("nCompiler", dependencies=TRUE)'
2840
- name: Install inline
29-
run: R -q -e 'remotes::install_cran(c("inline", "nimble"))'
41+
run: R -q -e 'remotes::install_cran("inline")'
3042
- name: Build Package
3143
run: |
3244
R CMD build nCompiler
@@ -44,7 +56,7 @@ jobs:
4456
runs-on: ubuntu-latest
4557
container:
4658
image: rocker/r2u:latest
47-
if: github.event.inputs.run_tests == 'yes'
59+
if: github.event.inputs.run_tests == 'yes' || github.event.inputs.run_nClass == 'yes'
4860
steps:
4961
- uses: actions/checkout@v3
5062
- name: SessionInfo
@@ -55,14 +67,15 @@ jobs:
5567
- name: Package Dependencies
5668
run: R -q -e 'remotes::install_deps("nCompiler", dependencies=TRUE)'
5769
- name: Install inline
58-
run: R -q -e 'remotes::install_cran("inline")'
70+
run: R -q -e 'remotes::install_cran(c("inline", "nimble"))'
5971
- name: Build Package
6072
run: |
6173
R CMD build nCompiler
6274
R CMD INSTALL --install-tests nCompiler_*.tar.gz
6375
- name: Run nCompile and other tests
6476
run: |
6577
library(nCompiler)
78+
testthat::test_dir("nCompiler/tests/testthat/nimble_tests", reporter = "summary")
6679
testthat::test_dir("nCompiler/tests/testthat/nClass_tests", reporter = "summary")
6780
testthat::test_dir("nCompiler/tests/testthat/types_tests", reporter = "summary")
6881
testthat::test_dir("nCompiler/tests/testthat/serialization_tests", reporter = "summary")
@@ -72,7 +85,7 @@ jobs:
7285
runs-on: ubuntu-latest
7386
container:
7487
image: rocker/r2u:latest
75-
if: github.event.inputs.run_tests == 'yes'
88+
if: github.event.inputs.run_tests == 'yes' || github.event.inputs.run_math == 'yes'
7689
steps:
7790
- uses: actions/checkout@v3
7891
- name: SessionInfo

.github/workflows/test-suites.yml

Lines changed: 0 additions & 269 deletions
This file was deleted.

nCompiler/DESCRIPTION

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Authors@R: c(person("Perry", "de Valpine", email = "pdevalpine@berkeley.edu", ro
66
person("Christopher", "Paciorek", role = "ctb"),
77
person("James", "Duncan", role = "ctr"))
88
Description: Provides nFunction and nClass for function and class definitions for which C++ can be automatically generated, or used in combination with other C++. Supports linear algebra by code-generating C++ that uses the Eigen library. Supports automatic differentiation by code-generating C++ that uses the CppAD library. Support for parallelization is planned by code-generating C++ that uses Intel Threading Building Blocks (TBB).
9-
Depends: R (>= 3.3.0)
9+
Depends: R (>= 4.1.0)
1010
Imports:
1111
methods,R6,Rcpp,pkgKitten,roxygen2
1212
Suggests:
@@ -49,6 +49,10 @@ Collate:
4949
cppDefs_TBB.R
5050
cppDefs_variables.R
5151
developerTools.R
52+
symbolTable.R
53+
symbolTableClass.R
54+
symbolTable_utils.R
55+
typeDeclarations.R
5256
NC.R
5357
NC_Compile.R
5458
NC_CompilerClass.R
@@ -70,6 +74,7 @@ Collate:
7074
NF_Utils.R
7175
nCompile.R
7276
nConstructor.R
77+
nimbleModels.R
7378
nList.R
7479
nTry.R
7580
packaging.R
@@ -78,11 +83,7 @@ Collate:
7883
Rcpp_nCompiler.R
7984
Rexecution.R
8085
Rhooks.R
81-
symbolTable.R
82-
symbolTableClass.R
83-
symbolTable_utils.R
8486
testingTools.R
85-
typeDeclarations.R
8687
compile_zzz_operatorLists.R
8788
zzz_NC_Predefined.R
8889
RoxygenNote: 7.3.2

nCompiler/NAMESPACE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ export(isUserDefined)
5555
export(logfact)
5656
export(loggam)
5757
export(logit)
58+
export(makeModel_nClass)
59+
export(make_node_fun)
5860
export(method)
61+
export(modelBase_nClass)
5962
export(new.loadedObjectEnv) ## needed for Rcpp::Function access in loadedObjectEnv.h
6063
export(new.loadedObjectEnv_full) ## ditto
6164
export(nBacksolve)

0 commit comments

Comments
 (0)