diff --git a/archived_tests/v1tests/status.txt b/archived_tests/v1tests/status.txt index ca46caa2..5dabc036 100644 --- a/archived_tests/v1tests/status.txt +++ b/archived_tests/v1tests/status.txt @@ -68,7 +68,7 @@ labelAbstractTypes: [ FAIL 0 | WARN 0 | SKIP 1 | PASS 25 ] math: -nClass_interface: [ FAIL 2 | WARN 0 | SKIP 0 | PASS 4 ] +nC_inter: [ FAIL 2 | WARN 0 | SKIP 0 | PASS 4 ] `check` not equal to array(c(2.3, 3.4, 4.5)). Attributes: < target is NULL, current is list > vector set and get from a full interface diff --git a/nCompiler/NAMESPACE b/nCompiler/NAMESPACE index 9eddedec..5f02e92b 100644 --- a/nCompiler/NAMESPACE +++ b/nCompiler/NAMESPACE @@ -9,7 +9,7 @@ export(argType2Cpp) export(build_compiled_nClass) export(calcInputList_to_calcInstrList) export(calcInstr_nClass) -export(calcInstrList_nClass) +export(calcInstrList_nC) export(cloglog) export(check_Rcpp_for_nCompiler) export(compileNimble) diff --git a/nCompiler/R/Rcpp_nCompiler_plugin.R b/nCompiler/R/Rcpp_nCompiler_plugin.R index dc291150..e585bace 100644 --- a/nCompiler/R/Rcpp_nCompiler_plugin.R +++ b/nCompiler/R/Rcpp_nCompiler_plugin.R @@ -12,13 +12,13 @@ inlineCxxPlugin_env <- new.env() ## registerPlugin occurs in the package source code. inlineCxxPlugin <- function(...) { uses_eigen <- !isFALSE(inlineCxxPlugin_env$uses_eigen) - uses_nClass_interface <- !isFALSE(inlineCxxPlugin_env$uses_nClass_interface) + uses_nC_inter <- !isFALSE(inlineCxxPlugin_env$uses_nC_inter) uses_nList <- !isFALSE(inlineCxxPlugin_env$uses_nList) uses_cereal <- !isFALSE(inlineCxxPlugin_env$uses_cereal) uses_TBB <- FALSE # !isFALSE(inlineCxxPlugin_env$uses_TBB) # including here causes error due to #defining FALSE include.before <- character() if(uses_eigen) include.before <- paste0(include.before, "#define NCOMPILER_USES_EIGEN\n") - if(uses_nClass_interface) include.before <- paste0(include.before, "#define NCOMPILER_USES_NCLASS_INTERFACE\n") + if(uses_nC_inter) include.before <- paste0(include.before, "#define NCOMPILER_USES_NCLASS_INTERFACE\n") if(uses_nList) include.before <- paste0(include.before, "#define NCOMPILER_USES_NLIST\n") if(uses_cereal) include.before <- paste0(include.before, "#define NCOMPILER_USES_CEREAL\n") if(uses_TBB) include.before <- paste0(include.before, "#define NCOMPILER_USES_TBB\n") diff --git a/nCompiler/R/cppDefs_R_interface_calls.R b/nCompiler/R/cppDefs_R_interface_calls.R index e53aebf6..a8b14c3b 100644 --- a/nCompiler/R/cppDefs_R_interface_calls.R +++ b/nCompiler/R/cppDefs_R_interface_calls.R @@ -5,7 +5,7 @@ global_R_interface_cppDef <- # ), # Hincludes = nCompilerIncludeFile("nCompiler_omnibus_first_h.h"), #CPPincludes = c(nCompilerIncludeFile("nCompiler_omnibus_first_cpp.h"), - # nCompilerIncludeFile("nClass_interface/post_Rcpp/process_call_args.h")), + # nCompilerIncludeFile("nC_inter/post_Rcpp/process_call_args.h")), Hpreamble = c("#define NCOMPILER_USES_NCLASS_INTERFACE", "#define USES_NCOMPILER"), CPPpreamble = c("#define NCOMPILER_USES_NCLASS_INTERFACE", diff --git a/nCompiler/R/cppDefs_serialize.R b/nCompiler/R/cppDefs_serialize.R index 431f5fea..971d727b 100644 --- a/nCompiler/R/cppDefs_serialize.R +++ b/nCompiler/R/cppDefs_serialize.R @@ -19,7 +19,7 @@ global_serialization_cppDef <- # This is done here because it must be done once and only once to avoid # duplicate symbols when compiling as a package. CPPincludes = c(#nCompilerIncludeFile("nCompiler_omnibus_first_cpp.h"), - nCompilerIncludeFile("nClass_cereal/post_Rcpp/serialization_mgr.h")), + nCompilerIncludeFile("nC_cereal/post_Rcpp/serialization_mgr.h")), CPPusings = c("using namespace Rcpp;", "// [[Rcpp::plugins(nCompiler_plugin)]]", "// [[Rcpp::depends(nCompiler)]]", diff --git a/nCompiler/R/nimbleModels.R b/nCompiler/R/nimbleModels.R index 71f0b267..93031bbe 100644 --- a/nCompiler/R/nimbleModels.R +++ b/nCompiler/R/nimbleModels.R @@ -20,7 +20,7 @@ nodeInstr_nClass <- nClass( methodInstr = 'integerVector', indsInstrVec = "nList('integerVector')" ), - predefined = quote(system.file(file.path("include","nCompiler", "predefined_nClasses"), package="nCompiler") |> + predefined = quote(system.file(file.path("include","nCompiler", "predef"), package="nCompiler") |> file.path("nodeInstr_nClass")), compileInfo=list(interface="full", createFromR = TRUE#, @@ -34,7 +34,7 @@ calcInstr_nClass <- nClass( nodeIndex = 'integerScalar', nodeInstrVec = "nList('nodeInstr_nClass')" ), - predefined = quote(system.file(file.path("include","nCompiler", "predefined_nClasses"), package="nCompiler") |> + predefined = quote(system.file(file.path("include","nCompiler", "predef"), package="nCompiler") |> file.path("calcInstr_nClass")), compileInfo=list(interface="full", createFromR = TRUE, @@ -43,13 +43,13 @@ calcInstr_nClass <- nClass( ) ) -calcInstrList_nClass <- nClass( - classname = "calcInstrList_nClass", +calcInstrList_nC <- nClass( + classname = "calcInstrList_nC", Cpublic = list( calcInstrList = "nList('calcInstr_nClass')" ), - predefined = quote(system.file(file.path("include","nCompiler", "predefined_nClasses"), package="nCompiler") |> - file.path("calcInstrList_nClass")), + predefined = quote(system.file(file.path("include","nCompiler", "predef"), package="nCompiler") |> + file.path("calcInstrList_nC")), compileInfo=list(interface="full", createFromR = TRUE, Hincludes = "") @@ -71,7 +71,7 @@ nodeFxnBase_nClass <- nClass( ), # We haven't dealt with ensuring a virtual destructor when any method is virtual # For now I did it manually by editing the .h and .cpp - predefined = quote(system.file(file.path("include","nCompiler", "predefined_nClasses"), package="nCompiler") |> + predefined = quote(system.file(file.path("include","nCompiler", "predef"), package="nCompiler") |> file.path("nodeFxnBase_nClass")), compileInfo=list(interface="full", createFromR = FALSE) @@ -92,17 +92,17 @@ modelBase_nClass <- nClass( function(calcInstrList) {cat("In uncompiled calculate\n")}, returnType = 'numericScalar', compileInfo = list( - C_fun = function(calcInstrList='calcInstrList_nClass') { + C_fun = function(calcInstrList='calcInstrList_nC') { cppLiteral('Rprintf("modelBase_nClass calculate (should not see this)\\n");'); return(0)}, virtual=TRUE ) ) ), # See comment above about needing to ensure a virtual destructor - predefined = quote(system.file(file.path("include","nCompiler", "predefined_nClasses"), package="nCompiler") |> file.path("modelBase_nClass")), + predefined = quote(system.file(file.path("include","nCompiler", "predef"), package="nCompiler") |> file.path("modelBase_nClass")), compileInfo=list(interface="full", createFromR = FALSE, - Hincludes = c("", "")) + Hincludes = c("", "")) ) # nCompile(modelBase_nClass, control=list(generate_predefined=TRUE)) @@ -270,7 +270,7 @@ makeModel_nClass <- function(varInfo, compileInfo = list(opDefs = OPDEFS, nClass_inherit = list(base=BASECLASS) #inherit = list(base = "public modelClass_"), - #Hincludes = "" + #Hincludes = "" ), Cpublic = CPUBLIC ), @@ -361,7 +361,7 @@ make_model_from_nimbleModel <- function(m) { model <- makeModel_nClass(modelVarInfo, nodeInfoList, classname = "my_model") # Currently we must compile from here because here is where we know the nodeFxnName[s]. # We have a situation where order matters: model needs to come after the utility classes. Fix me. - argList <- list("modelBase_nClass", "nodeFxnBase_nClass", "calcInstrList_nClass", "calcInstr_nClass", "nodeInstr_nClass", "model") + argList <- list("modelBase_nClass", "nodeFxnBase_nClass", "calcInstrList_nC", "calcInstr_nClass", "nodeInstr_nClass", "model") argList <- c(argList, as.list(nodeFxnNames)) argList <- argList |> lapply(as.name) Cmodel <- do.call("nCompile", argList) @@ -389,7 +389,7 @@ calcInputList_to_calcInstrList <- function(calcInputList, comp) { calcInstr$nodeInstrVec <- nodeInstrVec calcInstrList[[iCalc]] <- calcInstr } - calcInstrListObj <- comp$calcInstrList_nClass$new() + calcInstrListObj <- comp$calcInstrList_nC$new() calcInstrListObj$calcInstrList <- calcInstrList return(calcInstrListObj) } diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/.DS_Store b/nCompiler/inst/include/nCompiler/ET_Rcpp_ext/.DS_Store similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/.DS_Store rename to nCompiler/inst/include/nCompiler/ET_Rcpp_ext/.DS_Store diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/EigenTensor_Rcpp_extensions_forward_declarations.h b/nCompiler/inst/include/nCompiler/ET_Rcpp_ext/ET_Rcpp_ext_forward_declarations.h similarity index 90% rename from nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/EigenTensor_Rcpp_extensions_forward_declarations.h rename to nCompiler/inst/include/nCompiler/ET_Rcpp_ext/ET_Rcpp_ext_forward_declarations.h index 0dc51475..c84392ed 100644 --- a/nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/EigenTensor_Rcpp_extensions_forward_declarations.h +++ b/nCompiler/inst/include/nCompiler/ET_Rcpp_ext/ET_Rcpp_ext_forward_declarations.h @@ -1,5 +1,5 @@ -#ifndef EIGENTENSOR_RCPP_EXTENSIONS_FORWARD_DECLARATIONS_H_ -#define EIGENTENSOR_RCPP_EXTENSIONS_FORWARD_DECLARATIONS_H_ +#ifndef ET_Rcpp_ext_FORWARD_DECLARATIONS_H_ +#define ET_Rcpp_ext_FORWARD_DECLARATIONS_H_ #include #include @@ -59,4 +59,4 @@ namespace Rcpp { } // end namespace traits } // end namespace Rcpp -#endif // EIGENTENSOR_RCPP_EXTENSIONS_FORWARD_DECLARATIONS_H_ +#endif // ET_Rcpp_ext_FORWARD_DECLARATIONS_H_ diff --git a/nCompiler/inst/include/nCompiler/ET_Rcpp_ext/ET_Rcpp_ext_post_Rcpp.h b/nCompiler/inst/include/nCompiler/ET_Rcpp_ext/ET_Rcpp_ext_post_Rcpp.h new file mode 100644 index 00000000..53401835 --- /dev/null +++ b/nCompiler/inst/include/nCompiler/ET_Rcpp_ext/ET_Rcpp_ext_post_Rcpp.h @@ -0,0 +1,10 @@ +//#ifndef NCOMPILER_ET_Rcpp_ext_H_ +//#define NCOMPILER_ET_Rcpp_ext_H_ + +//#include "ET_Rcpp_ext_pre_Rcpp.h" +#include +#include +#include +#include + +//#endif // EIGEN_RCPP_EXTENSIONS_H_ diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/EigenTensor_Rcpp_extensions_pre_Rcpp.h b/nCompiler/inst/include/nCompiler/ET_Rcpp_ext/ET_Rcpp_ext_pre_Rcpp.h similarity index 74% rename from nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/EigenTensor_Rcpp_extensions_pre_Rcpp.h rename to nCompiler/inst/include/nCompiler/ET_Rcpp_ext/ET_Rcpp_ext_pre_Rcpp.h index 50b1e4ac..9a91c978 100644 --- a/nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/EigenTensor_Rcpp_extensions_pre_Rcpp.h +++ b/nCompiler/inst/include/nCompiler/ET_Rcpp_ext/ET_Rcpp_ext_pre_Rcpp.h @@ -7,8 +7,8 @@ #define EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS //#include -#include "EigenTensor_Rcpp_extensions_forward_declarations.h" -//#include +#include "ET_Rcpp_ext_forward_declarations.h" +//#include #include "ETaccessor.h" //#endif // NCOMPILER_TENSOR_RCPP_FORWARD_DECLARATIONS_H_ diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/ETaccessor.h b/nCompiler/inst/include/nCompiler/ET_Rcpp_ext/ETaccessor.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/ETaccessor.h rename to nCompiler/inst/include/nCompiler/ET_Rcpp_ext/ETaccessor.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/post_Rcpp/EigenTensor_Rcpp_as_wrap.h b/nCompiler/inst/include/nCompiler/ET_Rcpp_ext/post_Rcpp/ET_Rcpp_as_wrap.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/post_Rcpp/EigenTensor_Rcpp_as_wrap.h rename to nCompiler/inst/include/nCompiler/ET_Rcpp_ext/post_Rcpp/ET_Rcpp_as_wrap.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/post_Rcpp/EigenTensor_SEXP_converter.h b/nCompiler/inst/include/nCompiler/ET_Rcpp_ext/post_Rcpp/ET_SEXP_converter.h similarity index 99% rename from nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/post_Rcpp/EigenTensor_SEXP_converter.h rename to nCompiler/inst/include/nCompiler/ET_Rcpp_ext/post_Rcpp/ET_SEXP_converter.h index 52dea366..66729bd1 100644 --- a/nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/post_Rcpp/EigenTensor_SEXP_converter.h +++ b/nCompiler/inst/include/nCompiler/ET_Rcpp_ext/post_Rcpp/ET_SEXP_converter.h @@ -6,7 +6,7 @@ #include #include "SEXP_2_EigenTensor.h" #include "SEXP_indices_2_IndexArray.h" -#include +#include #define PRINTF Rprintf diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/post_Rcpp/ETaccessor_post_Rcpp.h b/nCompiler/inst/include/nCompiler/ET_Rcpp_ext/post_Rcpp/ETaccessor_post_Rcpp.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/post_Rcpp/ETaccessor_post_Rcpp.h rename to nCompiler/inst/include/nCompiler/ET_Rcpp_ext/post_Rcpp/ETaccessor_post_Rcpp.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/post_Rcpp/SEXP_2_EigenTensor.h b/nCompiler/inst/include/nCompiler/ET_Rcpp_ext/post_Rcpp/SEXP_2_EigenTensor.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/post_Rcpp/SEXP_2_EigenTensor.h rename to nCompiler/inst/include/nCompiler/ET_Rcpp_ext/post_Rcpp/SEXP_2_EigenTensor.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/post_Rcpp/SEXP_indices_2_IndexArray.h b/nCompiler/inst/include/nCompiler/ET_Rcpp_ext/post_Rcpp/SEXP_indices_2_IndexArray.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/post_Rcpp/SEXP_indices_2_IndexArray.h rename to nCompiler/inst/include/nCompiler/ET_Rcpp_ext/post_Rcpp/SEXP_indices_2_IndexArray.h diff --git a/nCompiler/inst/include/nCompiler/ET_ext/ET_ext_post_Rcpp.h b/nCompiler/inst/include/nCompiler/ET_ext/ET_ext_post_Rcpp.h new file mode 100644 index 00000000..3c7ed90e --- /dev/null +++ b/nCompiler/inst/include/nCompiler/ET_ext/ET_ext_post_Rcpp.h @@ -0,0 +1,23 @@ +//#ifndef __NCOMPILER_EIGEN_FXNS +//#define __NCOMPILER_EIGEN_FXNS + +//#include "ET_Rcpp_ext_forward_declarations.h" +//#include + +// These are going in a post_Rcpp directory. +// However, any of them could be pre_Rcpp. They could be either. +#include +#include +//#include "repClass.h" +//#include "seqClass.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//#endif diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/EigenTensor_extensions_pre_Rcpp.h b/nCompiler/inst/include/nCompiler/ET_ext/ET_ext_pre_Rcpp.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_extensions/EigenTensor_extensions_pre_Rcpp.h rename to nCompiler/inst/include/nCompiler/ET_ext/ET_ext_pre_Rcpp.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/StridedTensorMap.h b/nCompiler/inst/include/nCompiler/ET_ext/StridedTensorMap.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_extensions/StridedTensorMap.h rename to nCompiler/inst/include/nCompiler/ET_ext/StridedTensorMap.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/StridedTensorMapInfo.h b/nCompiler/inst/include/nCompiler/ET_ext/StridedTensorMapInfo.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_extensions/StridedTensorMapInfo.h rename to nCompiler/inst/include/nCompiler/ET_ext/StridedTensorMapInfo.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/index_block.h b/nCompiler/inst/include/nCompiler/ET_ext/index_block.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_extensions/index_block.h rename to nCompiler/inst/include/nCompiler/ET_ext/index_block.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/nCompiler_Eigen_EnableErrors.h_deprecated b/nCompiler/inst/include/nCompiler/ET_ext/nCompiler_Eigen_EnableErrors.h_deprecated similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_extensions/nCompiler_Eigen_EnableErrors.h_deprecated rename to nCompiler/inst/include/nCompiler/ET_ext/nCompiler_Eigen_EnableErrors.h_deprecated diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/recyclingRule.h b/nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/recyclingRule.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/recyclingRule.h rename to nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/recyclingRule.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/setWhich.h b/nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/setWhich.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/setWhich.h rename to nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/setWhich.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/tensorCreation.h b/nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/tensorCreation.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/tensorCreation.h rename to nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/tensorCreation.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/tensorFlex.h b/nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/tensorFlex.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/tensorFlex.h rename to nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/tensorFlex.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/tensorFlex_CppAD.h b/nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/tensorFlex_CppAD.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/tensorFlex_CppAD.h rename to nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/tensorFlex_CppAD.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/tensorIndexingOps.h b/nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/tensorIndexingOps.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/tensorIndexingOps.h rename to nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/tensorIndexingOps.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/tensorOperations.h b/nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/tensorOperations.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/tensorOperations.h rename to nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/tensorOperations.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/tensorUtils.h b/nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/tensorUtils.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/tensorUtils.h rename to nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/tensorUtils.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/tensor_cat_op.h b/nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/tensor_cat_op.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/tensor_cat_op.h rename to nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/tensor_cat_op.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/tensor_rep_op.h b/nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/tensor_rep_op.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/tensor_rep_op.h rename to nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/tensor_rep_op.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/tensor_seq_op.h b/nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/tensor_seq_op.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/tensor_seq_op.h rename to nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/tensor_seq_op.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/typedefs.h b/nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/typedefs.h similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_extensions/post_Rcpp/typedefs.h rename to nCompiler/inst/include/nCompiler/ET_ext/post_Rcpp/typedefs.h diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/repClass.h_deprecated b/nCompiler/inst/include/nCompiler/ET_ext/repClass.h_deprecated similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_extensions/repClass.h_deprecated rename to nCompiler/inst/include/nCompiler/ET_ext/repClass.h_deprecated diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/seqClass.h_deprecated b/nCompiler/inst/include/nCompiler/ET_ext/seqClass.h_deprecated similarity index 100% rename from nCompiler/inst/include/nCompiler/EigenTensor_extensions/seqClass.h_deprecated rename to nCompiler/inst/include/nCompiler/ET_ext/seqClass.h_deprecated diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/EigenTensor_Rcpp_extensions_post_Rcpp.h b/nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/EigenTensor_Rcpp_extensions_post_Rcpp.h deleted file mode 100644 index 96d06853..00000000 --- a/nCompiler/inst/include/nCompiler/EigenTensor_Rcpp_extensions/EigenTensor_Rcpp_extensions_post_Rcpp.h +++ /dev/null @@ -1,10 +0,0 @@ -//#ifndef NCOMPILER_EIGENTENSOR_RCPP_EXTENSIONS_H_ -//#define NCOMPILER_EIGENTENSOR_RCPP_EXTENSIONS_H_ - -//#include "EigenTensor_Rcpp_extensions_pre_Rcpp.h" -#include -#include -#include -#include - -//#endif // EIGEN_RCPP_EXTENSIONS_H_ diff --git a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/EigenTensor_extensions_post_Rcpp.h b/nCompiler/inst/include/nCompiler/EigenTensor_extensions/EigenTensor_extensions_post_Rcpp.h deleted file mode 100644 index ba8a8ebb..00000000 --- a/nCompiler/inst/include/nCompiler/EigenTensor_extensions/EigenTensor_extensions_post_Rcpp.h +++ /dev/null @@ -1,23 +0,0 @@ -//#ifndef __NCOMPILER_EIGEN_FXNS -//#define __NCOMPILER_EIGEN_FXNS - -//#include "EigenTensor_Rcpp_extensions_forward_declarations.h" -//#include - -// These are going in a post_Rcpp directory. -// However, any of them could be pre_Rcpp. They could be either. -#include -#include -//#include "repClass.h" -//#include "seqClass.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//#endif diff --git a/nCompiler/inst/include/nCompiler/INCLUDE_RULES.txt b/nCompiler/inst/include/nCompiler/INCLUDE_RULES.txt index aceb4b81..030ec4a8 100644 --- a/nCompiler/inst/include/nCompiler/INCLUDE_RULES.txt +++ b/nCompiler/inst/include/nCompiler/INCLUDE_RULES.txt @@ -14,7 +14,7 @@ Here is the scheme and associated rules: 5. Generated .cpp files will (normally) have "#include "nCompiler_omnibus_first_cpp.h" This will use previously stated #define flags to decide what to include further. It also has what should be the **ONLY** statement of "#include ". -6. In general, headers for each of the components (Rcpp, nClass_interfaces, Eigen, Cereal, and TBB) are in separate directories. There are also directories for some "interaction" components like nClass_interfaces+Eigen and others. +6. In general, headers for each of the components (Rcpp, nC_inters, Eigen, Cereal, and TBB) are in separate directories. There are also directories for some "interaction" components like nC_inters+Eigen and others. 7. There is inclusion across directories because it is necessary. 8. Each component's directory has a "_pre_Rcpp.h" and "_post_Rcpp.h" which contain simple collections of other #include statements. These are generally what is included from "nCompiler_omnibus_first_h.h" and "nCompiler_omnibus_first_cpp.h", respectively. These should NEVER be included from other files, because they don't have their own #ifndef protection and so in theory could recurse infinitely. Inclusion from other files should directly target specific files. 9. Files that have "post_Rcpp" status (i.e. should never be included from a pathway stemming from "nCompiler_omnibus_first_h.h") are placed in subdirectories called post_Rcpp within each component directory. This helps us avoid accidentally including something pre_Rcpp that should be post_Rcpp. They can only be included if the directory path explicitly includes "/post_Rcpp/" so that it sticks out. diff --git a/nCompiler/inst/include/nCompiler/nClass_cereal/archives.h b/nCompiler/inst/include/nCompiler/nC_cereal/archives.h similarity index 100% rename from nCompiler/inst/include/nCompiler/nClass_cereal/archives.h rename to nCompiler/inst/include/nCompiler/nC_cereal/archives.h diff --git a/nCompiler/inst/include/nCompiler/nC_cereal/nC_cereal_post_Rcpp.h b/nCompiler/inst/include/nCompiler/nC_cereal/nC_cereal_post_Rcpp.h new file mode 100644 index 00000000..01958436 --- /dev/null +++ b/nCompiler/inst/include/nCompiler/nC_cereal/nC_cereal_post_Rcpp.h @@ -0,0 +1,4 @@ + +#include +#include +//#include diff --git a/nCompiler/inst/include/nCompiler/nClass_cereal/nClass_cereal_pre_Rcpp.h b/nCompiler/inst/include/nCompiler/nC_cereal/nC_cereal_pre_Rcpp.h similarity index 100% rename from nCompiler/inst/include/nCompiler/nClass_cereal/nClass_cereal_pre_Rcpp.h rename to nCompiler/inst/include/nCompiler/nC_cereal/nC_cereal_pre_Rcpp.h diff --git a/nCompiler/inst/include/nCompiler/nClass_cereal/post_Rcpp/Rcpp_types_cereal.h b/nCompiler/inst/include/nCompiler/nC_cereal/post_Rcpp/Rcpp_types_cereal.h similarity index 98% rename from nCompiler/inst/include/nCompiler/nClass_cereal/post_Rcpp/Rcpp_types_cereal.h rename to nCompiler/inst/include/nCompiler/nC_cereal/post_Rcpp/Rcpp_types_cereal.h index 3f84f862..a04cc7c8 100644 --- a/nCompiler/inst/include/nCompiler/nClass_cereal/post_Rcpp/Rcpp_types_cereal.h +++ b/nCompiler/inst/include/nCompiler/nC_cereal/post_Rcpp/Rcpp_types_cereal.h @@ -1,7 +1,7 @@ #ifndef RCPP_TYPES_CEREAL_H_ #define RCPP_TYPES_CEREAL_H_ -#include +#include template struct is_RcppType { diff --git a/nCompiler/inst/include/nCompiler/nClass_cereal/post_Rcpp/save_load_Rcpp_types.h b/nCompiler/inst/include/nCompiler/nC_cereal/post_Rcpp/save_load_Rcpp_types.h similarity index 94% rename from nCompiler/inst/include/nCompiler/nClass_cereal/post_Rcpp/save_load_Rcpp_types.h rename to nCompiler/inst/include/nCompiler/nC_cereal/post_Rcpp/save_load_Rcpp_types.h index ee707d84..97c0d6ef 100644 --- a/nCompiler/inst/include/nCompiler/nClass_cereal/post_Rcpp/save_load_Rcpp_types.h +++ b/nCompiler/inst/include/nCompiler/nC_cereal/post_Rcpp/save_load_Rcpp_types.h @@ -1,7 +1,7 @@ #ifndef NCOMPILER_CEREAL_SAVE_LOAD_RCPP_TYPES_H_ #define NCOMPILER_CEREAL_SAVE_LOAD_RCPP_TYPES_H_ -#include +#include #include "Rcpp_types_cereal.h" template diff --git a/nCompiler/inst/include/nCompiler/nClass_cereal/post_Rcpp/serialization_mgr.h b/nCompiler/inst/include/nCompiler/nC_cereal/post_Rcpp/serialization_mgr.h similarity index 91% rename from nCompiler/inst/include/nCompiler/nClass_cereal/post_Rcpp/serialization_mgr.h rename to nCompiler/inst/include/nCompiler/nC_cereal/post_Rcpp/serialization_mgr.h index 2c4bd537..41baae9a 100644 --- a/nCompiler/inst/include/nCompiler/nClass_cereal/post_Rcpp/serialization_mgr.h +++ b/nCompiler/inst/include/nCompiler/nC_cereal/post_Rcpp/serialization_mgr.h @@ -1,13 +1,13 @@ #ifndef _NCOMP_SERIALIZATION_MGR #define _NCOMP_SERIALIZATION_MGR -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include // Rough draft of C++ serialization manager class // I want to make this as similar as possible to the design of an nClass // for simplicity and code re-use. diff --git a/nCompiler/inst/include/nCompiler/nClass_interface/.DS_Store b/nCompiler/inst/include/nCompiler/nC_inter/.DS_Store similarity index 100% rename from nCompiler/inst/include/nCompiler/nClass_interface/.DS_Store rename to nCompiler/inst/include/nCompiler/nC_inter/.DS_Store diff --git a/nCompiler/inst/include/nCompiler/nClass_interface/expand_call_method.h b/nCompiler/inst/include/nCompiler/nC_inter/expand_call_method.h similarity index 100% rename from nCompiler/inst/include/nCompiler/nClass_interface/expand_call_method.h rename to nCompiler/inst/include/nCompiler/nC_inter/expand_call_method.h diff --git a/nCompiler/inst/include/nCompiler/nClass_interface/generic_class_interface.h b/nCompiler/inst/include/nCompiler/nC_inter/generic_class_interface.h similarity index 98% rename from nCompiler/inst/include/nCompiler/nClass_interface/generic_class_interface.h rename to nCompiler/inst/include/nCompiler/nC_inter/generic_class_interface.h index 7fd79b81..533d8885 100644 --- a/nCompiler/inst/include/nCompiler/nClass_interface/generic_class_interface.h +++ b/nCompiler/inst/include/nCompiler/nC_inter/generic_class_interface.h @@ -9,10 +9,10 @@ #include #include #ifdef NCOMPILER_USES_CEREAL -#include +#include #endif -#include -#include +#include +#include // We must be able to assume that any Rcpp extension // forward declarations have been made by now. diff --git a/nCompiler/inst/include/nCompiler/nClass_interface/loadedObjectsHook.h b/nCompiler/inst/include/nCompiler/nC_inter/loadedObjectsHook.h similarity index 98% rename from nCompiler/inst/include/nCompiler/nClass_interface/loadedObjectsHook.h rename to nCompiler/inst/include/nCompiler/nC_inter/loadedObjectsHook.h index b37c74f7..2fc6bf4b 100644 --- a/nCompiler/inst/include/nCompiler/nClass_interface/loadedObjectsHook.h +++ b/nCompiler/inst/include/nCompiler/nC_inter/loadedObjectsHook.h @@ -3,7 +3,7 @@ #include #ifdef NCOMPILER_USES_CEREAL -#include +#include #endif class loadedObjectHookBaseC { diff --git a/nCompiler/inst/include/nCompiler/nClass_interface/nClass_factory.h b/nCompiler/inst/include/nCompiler/nC_inter/nC_factory.h similarity index 98% rename from nCompiler/inst/include/nCompiler/nClass_interface/nClass_factory.h rename to nCompiler/inst/include/nCompiler/nC_inter/nC_factory.h index fc134204..8fe9cf15 100644 --- a/nCompiler/inst/include/nCompiler/nClass_interface/nClass_factory.h +++ b/nCompiler/inst/include/nCompiler/nC_inter/nC_factory.h @@ -4,7 +4,7 @@ #include #include #ifdef NCOMPILER_USES_CEREAL -#include +#include #endif #define SHOW_SHARED_PTR_DESTRUCTORS diff --git a/nCompiler/inst/include/nCompiler/nC_inter/nC_inter_post_Rcpp.h b/nCompiler/inst/include/nCompiler/nC_inter/nC_inter_post_Rcpp.h new file mode 100644 index 00000000..217cf78b --- /dev/null +++ b/nCompiler/inst/include/nCompiler/nC_inter/nC_inter_post_Rcpp.h @@ -0,0 +1,16 @@ +//#ifndef NCLASS_INTERFACE_POST_RCPP_H_ +//#define NCLASS_INTERFACE_POST_RCPP_H_ + +//#include "nC_inter_pre_Rcpp.h" +// process_call_args includes one non-templated function, so to avoid +// duplicate symbol errors from multiple compilation units, it is included +// in the interfaces cppDef managed from code-generation from R. +//#include +#include +#include +//#include + +// I think the following will be moved to a nimble 2.0 package but is drafted here for now +#include + +//#endif // NCLASS_INTERFACE_POST_RCPP_H_ diff --git a/nCompiler/inst/include/nCompiler/nClass_interface/nClass_interface_pre_Rcpp.h b/nCompiler/inst/include/nCompiler/nC_inter/nC_inter_pre_Rcpp.h similarity index 60% rename from nCompiler/inst/include/nCompiler/nClass_interface/nClass_interface_pre_Rcpp.h rename to nCompiler/inst/include/nCompiler/nC_inter/nC_inter_pre_Rcpp.h index bcbe3830..e7d7377c 100644 --- a/nCompiler/inst/include/nCompiler/nClass_interface/nClass_interface_pre_Rcpp.h +++ b/nCompiler/inst/include/nCompiler/nC_inter/nC_inter_pre_Rcpp.h @@ -1,9 +1,9 @@ //#ifndef OMNIBUS_NCLASS_INTERFACE_H_ //#define OMNIBUS_NCLASS_INTERFACE_H_ -#include +#include #include "generic_class_interface.h" -#include "nClass_factory.h" +#include "nC_factory.h" #include "loadedObjectsHook.h" //#endif // OMNIBUS_NCLASS_INTERFACE_H_ diff --git a/nCompiler/inst/include/nCompiler/nClass_interface/nCompiler_class_interface_old.h b/nCompiler/inst/include/nCompiler/nC_inter/nCompiler_class_interface_old.h similarity index 100% rename from nCompiler/inst/include/nCompiler/nClass_interface/nCompiler_class_interface_old.h rename to nCompiler/inst/include/nCompiler/nC_inter/nCompiler_class_interface_old.h diff --git a/nCompiler/inst/include/nCompiler/nClass_interface/post_Rcpp/generic_class_interface_Rcpp_steps.h b/nCompiler/inst/include/nCompiler/nC_inter/post_Rcpp/generic_class_interface_Rcpp_steps.h similarity index 99% rename from nCompiler/inst/include/nCompiler/nClass_interface/post_Rcpp/generic_class_interface_Rcpp_steps.h rename to nCompiler/inst/include/nCompiler/nC_inter/post_Rcpp/generic_class_interface_Rcpp_steps.h index 79780e0e..8551c24b 100644 --- a/nCompiler/inst/include/nCompiler/nClass_interface/post_Rcpp/generic_class_interface_Rcpp_steps.h +++ b/nCompiler/inst/include/nCompiler/nC_inter/post_Rcpp/generic_class_interface_Rcpp_steps.h @@ -1,7 +1,7 @@ #ifndef GENERIC_CLASS_INTERFACE_RCPP_STEPS_H_ #define GENERIC_CLASS_INTERFACE_RCPP_STEPS_H_ -#include +#include // begin ETaccess scheme // If this works, I'll move it to its own header file. diff --git a/nCompiler/inst/include/nCompiler/nClass_interface/post_Rcpp/loadedObjectHookC_impl.h b/nCompiler/inst/include/nCompiler/nC_inter/post_Rcpp/loadedObjectHookC_impl.h similarity index 100% rename from nCompiler/inst/include/nCompiler/nClass_interface/post_Rcpp/loadedObjectHookC_impl.h rename to nCompiler/inst/include/nCompiler/nC_inter/post_Rcpp/loadedObjectHookC_impl.h diff --git a/nCompiler/inst/include/nCompiler/nClass_interface/post_Rcpp/nCompiler_compileNimble_support.h b/nCompiler/inst/include/nCompiler/nC_inter/post_Rcpp/nCompiler_compileNimble_support.h similarity index 100% rename from nCompiler/inst/include/nCompiler/nClass_interface/post_Rcpp/nCompiler_compileNimble_support.h rename to nCompiler/inst/include/nCompiler/nC_inter/post_Rcpp/nCompiler_compileNimble_support.h diff --git a/nCompiler/inst/include/nCompiler/nClass_interface/post_Rcpp/nCompiler_model_base_devel.h b/nCompiler/inst/include/nCompiler/nC_inter/post_Rcpp/nCompiler_model_base_devel.h similarity index 100% rename from nCompiler/inst/include/nCompiler/nClass_interface/post_Rcpp/nCompiler_model_base_devel.h rename to nCompiler/inst/include/nCompiler/nC_inter/post_Rcpp/nCompiler_model_base_devel.h diff --git a/nCompiler/inst/include/nCompiler/nClass_interface/post_Rcpp/process_call_args.h b/nCompiler/inst/include/nCompiler/nC_inter/post_Rcpp/process_call_args.h similarity index 99% rename from nCompiler/inst/include/nCompiler/nClass_interface/post_Rcpp/process_call_args.h rename to nCompiler/inst/include/nCompiler/nC_inter/post_Rcpp/process_call_args.h index 3ae55ee2..32368508 100644 --- a/nCompiler/inst/include/nCompiler/nClass_interface/post_Rcpp/process_call_args.h +++ b/nCompiler/inst/include/nCompiler/nC_inter/post_Rcpp/process_call_args.h @@ -5,7 +5,7 @@ // There is a forward declaration of process_call_args in generic_class_interface.h -/* #include */ +/* #include */ /* //#include */ /* SEXP process_call_args(const genericInterfaceBaseC::args::argVectorT &argVector, */ diff --git a/nCompiler/inst/include/nCompiler/nClass_interface/shared_ptr_as_wrap.h_defunct b/nCompiler/inst/include/nCompiler/nC_inter/shared_ptr_as_wrap.h_defunct similarity index 100% rename from nCompiler/inst/include/nCompiler/nClass_interface/shared_ptr_as_wrap.h_defunct rename to nCompiler/inst/include/nCompiler/nC_inter/shared_ptr_as_wrap.h_defunct diff --git a/nCompiler/inst/include/nCompiler/nClass_interface/shared_ptr_holder.h_defunct b/nCompiler/inst/include/nCompiler/nC_inter/shared_ptr_holder.h_defunct similarity index 100% rename from nCompiler/inst/include/nCompiler/nClass_interface/shared_ptr_holder.h_defunct rename to nCompiler/inst/include/nCompiler/nC_inter/shared_ptr_holder.h_defunct diff --git a/nCompiler/inst/include/nCompiler/nClass_interface_Rcpp_extensions/nClass_interface_Rcpp_extensions_post_Rcpp.h b/nCompiler/inst/include/nCompiler/nC_inter_Rcpp_ext/nC_inter_Rcpp_ext_post_Rcpp.h similarity index 66% rename from nCompiler/inst/include/nCompiler/nClass_interface_Rcpp_extensions/nClass_interface_Rcpp_extensions_post_Rcpp.h rename to nCompiler/inst/include/nCompiler/nC_inter_Rcpp_ext/nC_inter_Rcpp_ext_post_Rcpp.h index 0beb60fc..56499ceb 100644 --- a/nCompiler/inst/include/nCompiler/nClass_interface_Rcpp_extensions/nClass_interface_Rcpp_extensions_post_Rcpp.h +++ b/nCompiler/inst/include/nCompiler/nC_inter_Rcpp_ext/nC_inter_Rcpp_ext_post_Rcpp.h @@ -1,6 +1,6 @@ //#ifndef NCLASS_INTERFACE_RCPP_EXTENSIONS_POST_RCPP_H_ //#define NCLASS_INTERFACE_RCPP_EXTENSIONS_POST_RCPP_H_ -#include +#include //#endif // NCLASS_INTERFACE_RCPP_EXTENSIONS_POST_RCPP_H_ diff --git a/nCompiler/inst/include/nCompiler/nClass_interface_Rcpp_extensions/nClass_interface_Rcpp_extensions_pre_Rcpp.h b/nCompiler/inst/include/nCompiler/nC_inter_Rcpp_ext/nC_inter_Rcpp_ext_pre_Rcpp.h similarity index 100% rename from nCompiler/inst/include/nCompiler/nClass_interface_Rcpp_extensions/nClass_interface_Rcpp_extensions_pre_Rcpp.h rename to nCompiler/inst/include/nCompiler/nC_inter_Rcpp_ext/nC_inter_Rcpp_ext_pre_Rcpp.h diff --git a/nCompiler/inst/include/nCompiler/nClass_interface_Rcpp_extensions/post_Rcpp/shared_ptr_as_wrap.h b/nCompiler/inst/include/nCompiler/nC_inter_Rcpp_ext/post_Rcpp/shared_ptr_as_wrap.h similarity index 96% rename from nCompiler/inst/include/nCompiler/nClass_interface_Rcpp_extensions/post_Rcpp/shared_ptr_as_wrap.h rename to nCompiler/inst/include/nCompiler/nC_inter_Rcpp_ext/post_Rcpp/shared_ptr_as_wrap.h index 75f4cc2e..8c30a7f4 100644 --- a/nCompiler/inst/include/nCompiler/nClass_interface_Rcpp_extensions/post_Rcpp/shared_ptr_as_wrap.h +++ b/nCompiler/inst/include/nCompiler/nC_inter_Rcpp_ext/post_Rcpp/shared_ptr_as_wrap.h @@ -2,8 +2,8 @@ #define SHARED_PTR_AS_WRAP_H_ #include -#include -#include +#include +#include // #include "loadedObjectEnv.h" // For an input of type T (e.g. shared_ptr< some_nClass_ >), diff --git a/nCompiler/inst/include/nCompiler/nClass_interface_Rcpp_extensions/shared_ptr_as_wrap_forward_declarations.h b/nCompiler/inst/include/nCompiler/nC_inter_Rcpp_ext/shared_ptr_as_wrap_forward_declarations.h similarity index 100% rename from nCompiler/inst/include/nCompiler/nClass_interface_Rcpp_extensions/shared_ptr_as_wrap_forward_declarations.h rename to nCompiler/inst/include/nCompiler/nC_inter_Rcpp_ext/shared_ptr_as_wrap_forward_declarations.h diff --git a/nCompiler/inst/include/nCompiler/nClass_cereal/nClass_cereal_post_Rcpp.h b/nCompiler/inst/include/nCompiler/nClass_cereal/nClass_cereal_post_Rcpp.h deleted file mode 100644 index 0a1ddce2..00000000 --- a/nCompiler/inst/include/nCompiler/nClass_cereal/nClass_cereal_post_Rcpp.h +++ /dev/null @@ -1,4 +0,0 @@ - -#include -#include -//#include diff --git a/nCompiler/inst/include/nCompiler/nClass_interface/nClass_interface_post_Rcpp.h b/nCompiler/inst/include/nCompiler/nClass_interface/nClass_interface_post_Rcpp.h deleted file mode 100644 index 7744b494..00000000 --- a/nCompiler/inst/include/nCompiler/nClass_interface/nClass_interface_post_Rcpp.h +++ /dev/null @@ -1,16 +0,0 @@ -//#ifndef NCLASS_INTERFACE_POST_RCPP_H_ -//#define NCLASS_INTERFACE_POST_RCPP_H_ - -//#include "nClass_interface_pre_Rcpp.h" -// process_call_args includes one non-templated function, so to avoid -// duplicate symbol errors from multiple compilation units, it is included -// in the interfaces cppDef managed from code-generation from R. -//#include -#include -#include -//#include - -// I think the following will be moved to a nimble 2.0 package but is drafted here for now -#include - -//#endif // NCLASS_INTERFACE_POST_RCPP_H_ diff --git a/nCompiler/inst/include/nCompiler/nCompiler_omnibus.h b/nCompiler/inst/include/nCompiler/nCompiler_omnibus.h index d5bb8029..419f653e 100644 --- a/nCompiler/inst/include/nCompiler/nCompiler_omnibus.h +++ b/nCompiler/inst/include/nCompiler/nCompiler_omnibus.h @@ -48,8 +48,8 @@ using namespace Rcpp; #endif #ifdef NCOMPILER_USES_EIGEN -#include -#include +#include +#include #endif @@ -64,12 +64,12 @@ using namespace Rcpp; #include "omnibus_fxns.h" // What everything should see or need. #ifdef NCOMPILER_USES_CEREAL -#include +#include #endif #ifdef NCOMPILER_USES_NCLASS_INTERFACE -#include -#include +#include +#include #endif #ifdef NCOMPILER_USES_NLIST diff --git a/nCompiler/inst/include/nCompiler/nCompiler_omnibus_pre_Rcpp.h b/nCompiler/inst/include/nCompiler/nCompiler_omnibus_pre_Rcpp.h index 7d54ca93..f5a65a83 100644 --- a/nCompiler/inst/include/nCompiler/nCompiler_omnibus_pre_Rcpp.h +++ b/nCompiler/inst/include/nCompiler/nCompiler_omnibus_pre_Rcpp.h @@ -49,8 +49,8 @@ #endif #include - #include - #include + #include + #include #ifdef NCOMPILER_EIGEN_NDEBUG_DISABLED # define NDEBUG @@ -62,12 +62,12 @@ // END EIGEN_FIRST #ifdef NCOMPILER_USES_CEREAL -#include +#include #endif #ifdef NCOMPILER_USES_NCLASS_INTERFACE -#include -#include +#include +#include #endif #ifdef NCOMPILER_USES_NLIST diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/README.txt b/nCompiler/inst/include/nCompiler/predef/README.txt similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/README.txt rename to nCompiler/inst/include/nCompiler/predef/README.txt diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstrList_nClass/calcInstrList_nClass_copyFiles.txt b/nCompiler/inst/include/nCompiler/predef/calcInstrList_nC/calcInstrList_nC_copyFiles.txt similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstrList_nClass/calcInstrList_nClass_copyFiles.txt rename to nCompiler/inst/include/nCompiler/predef/calcInstrList_nC/calcInstrList_nC_copyFiles.txt diff --git a/nCompiler/inst/include/nCompiler/predef/calcInstrList_nC/calcInstrList_nC_cppContent.cpp b/nCompiler/inst/include/nCompiler/predef/calcInstrList_nC/calcInstrList_nC_cppContent.cpp new file mode 100644 index 00000000..c0fe96cc --- /dev/null +++ b/nCompiler/inst/include/nCompiler/predef/calcInstrList_nC/calcInstrList_nC_cppContent.cpp @@ -0,0 +1,45 @@ +/* OPENER (Do not edit this comment) */ +#ifndef __calcInstrList_nC_CPP +#define __calcInstrList_nC_CPP +/* BODY (Do not edit this comment) */ +#ifndef R_NO_REMAP +#define R_NO_REMAP +#endif +#include +#include "calcInstrList_nC_c_.h" +using namespace Rcpp; +// [[Rcpp::plugins(nCompiler_Eigen_plugin)]] +// [[Rcpp::depends(RcppParallel)]] +// [[Rcpp::depends(nCompiler)]] +// [[Rcpp::depends(Rcereal)]] + + calcInstrList_nC::calcInstrList_nC ( ) { +RESET_EIGEN_ERRORS +} + +// [[Rcpp::export(name = "new_calcInstrList_nC")]] + SEXP new_calcInstrList_nC ( ) { +RESET_EIGEN_ERRORS +return CREATE_NEW_NCOMP_OBJECT(calcInstrList_nC);; +} + +// [[Rcpp::export(name = "set_CnClass_env_new_calcInstrList_nC")]] + void set_CnClass_env_calcInstrList_nC ( SEXP env ) { +RESET_EIGEN_ERRORS +SET_CNCLASS_ENV(calcInstrList_nC, env);; +} + +// [[Rcpp::export(name = "get_CnClass_env_new_calcInstrList_nC")]] + Rcpp::Environment get_CnClass_env_calcInstrList_nC ( ) { +RESET_EIGEN_ERRORS +return GET_CNCLASS_ENV(calcInstrList_nC);; +} + +NCOMPILER_INTERFACE( +calcInstrList_nC, +NCOMPILER_FIELDS( +field("calcInstrList", &calcInstrList_nC::calcInstrList) +), +NCOMPILER_METHODS() +) +#endif diff --git a/nCompiler/inst/include/nCompiler/predef/calcInstrList_nC/calcInstrList_nC_filebase.txt b/nCompiler/inst/include/nCompiler/predef/calcInstrList_nC/calcInstrList_nC_filebase.txt new file mode 100644 index 00000000..1ca677eb --- /dev/null +++ b/nCompiler/inst/include/nCompiler/predef/calcInstrList_nC/calcInstrList_nC_filebase.txt @@ -0,0 +1 @@ +calcInstrList_nC_c_ diff --git a/nCompiler/inst/include/nCompiler/predef/calcInstrList_nC/calcInstrList_nC_hContent.h b/nCompiler/inst/include/nCompiler/predef/calcInstrList_nC/calcInstrList_nC_hContent.h new file mode 100644 index 00000000..e7a0b972 --- /dev/null +++ b/nCompiler/inst/include/nCompiler/predef/calcInstrList_nC/calcInstrList_nC_hContent.h @@ -0,0 +1,24 @@ +/* OPENER (Do not edit this comment) */ +#ifndef __calcInstrList_nC_H +#define __calcInstrList_nC_H +/* BODY (Do not edit this comment) */ +#ifndef R_NO_REMAP +#define R_NO_REMAP +#endif +#include +#include + +class calcInstrList_nC : public interface_resolver< genericInterfaceC >, public loadedObjectHookC { +public: + calcInstrList_nC ( ) ; + nList > calcInstrList; +}; + + SEXP new_calcInstrList_nC ( ) ; + + void set_CnClass_env_calcInstrList_nC ( SEXP env ) ; + + Rcpp::Environment get_CnClass_env_calcInstrList_nC ( ) ; + + +#endif diff --git a/nCompiler/inst/include/nCompiler/predef/calcInstrList_nC/calcInstrList_nC_manifest.txt b/nCompiler/inst/include/nCompiler/predef/calcInstrList_nC/calcInstrList_nC_manifest.txt new file mode 100644 index 00000000..190fc787 --- /dev/null +++ b/nCompiler/inst/include/nCompiler/predef/calcInstrList_nC/calcInstrList_nC_manifest.txt @@ -0,0 +1,7 @@ +list(saved_at = structure(1762608220.96116, class = c("POSIXct", +"POSIXt")), packet_name = "calcInstrList_nC", elements = c("preamble", +"cppContent", "hContent", "filebase", "post_cpp_compiler", "copyFiles" +), files = list(preamble = "calcInstrList_nC_preamble.cpp", + cppContent = "calcInstrList_nC_cppContent.cpp", hContent = "calcInstrList_nC_hContent.h", + filebase = "calcInstrList_nC_filebase.txt", post_cpp_compiler = "calcInstrList_nC_post_cpp_compiler.txt", + copyFiles = "calcInstrList_nC_copyFiles.txt")) diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstrList_nClass/calcInstrList_nClass_post_cpp_compiler.txt b/nCompiler/inst/include/nCompiler/predef/calcInstrList_nC/calcInstrList_nC_post_cpp_compiler.txt similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstrList_nClass/calcInstrList_nClass_post_cpp_compiler.txt rename to nCompiler/inst/include/nCompiler/predef/calcInstrList_nC/calcInstrList_nC_post_cpp_compiler.txt diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstrList_nClass/calcInstrList_nClass_preamble.cpp b/nCompiler/inst/include/nCompiler/predef/calcInstrList_nC/calcInstrList_nC_preamble.cpp similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstrList_nClass/calcInstrList_nClass_preamble.cpp rename to nCompiler/inst/include/nCompiler/predef/calcInstrList_nC/calcInstrList_nC_preamble.cpp diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstr_nClass/calcInstr_nClass_copyFiles.txt b/nCompiler/inst/include/nCompiler/predef/calcInstr_nClass/calcInstr_nClass_copyFiles.txt similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstr_nClass/calcInstr_nClass_copyFiles.txt rename to nCompiler/inst/include/nCompiler/predef/calcInstr_nClass/calcInstr_nClass_copyFiles.txt diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstr_nClass/calcInstr_nClass_cppContent.cpp b/nCompiler/inst/include/nCompiler/predef/calcInstr_nClass/calcInstr_nClass_cppContent.cpp similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstr_nClass/calcInstr_nClass_cppContent.cpp rename to nCompiler/inst/include/nCompiler/predef/calcInstr_nClass/calcInstr_nClass_cppContent.cpp diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstr_nClass/calcInstr_nClass_filebase.txt b/nCompiler/inst/include/nCompiler/predef/calcInstr_nClass/calcInstr_nClass_filebase.txt similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstr_nClass/calcInstr_nClass_filebase.txt rename to nCompiler/inst/include/nCompiler/predef/calcInstr_nClass/calcInstr_nClass_filebase.txt diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstr_nClass/calcInstr_nClass_hContent.h b/nCompiler/inst/include/nCompiler/predef/calcInstr_nClass/calcInstr_nClass_hContent.h similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstr_nClass/calcInstr_nClass_hContent.h rename to nCompiler/inst/include/nCompiler/predef/calcInstr_nClass/calcInstr_nClass_hContent.h diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstr_nClass/calcInstr_nClass_manifest.txt b/nCompiler/inst/include/nCompiler/predef/calcInstr_nClass/calcInstr_nClass_manifest.txt similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstr_nClass/calcInstr_nClass_manifest.txt rename to nCompiler/inst/include/nCompiler/predef/calcInstr_nClass/calcInstr_nClass_manifest.txt diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstr_nClass/calcInstr_nClass_post_cpp_compiler.txt b/nCompiler/inst/include/nCompiler/predef/calcInstr_nClass/calcInstr_nClass_post_cpp_compiler.txt similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstr_nClass/calcInstr_nClass_post_cpp_compiler.txt rename to nCompiler/inst/include/nCompiler/predef/calcInstr_nClass/calcInstr_nClass_post_cpp_compiler.txt diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstr_nClass/calcInstr_nClass_preamble.cpp b/nCompiler/inst/include/nCompiler/predef/calcInstr_nClass/calcInstr_nClass_preamble.cpp similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstr_nClass/calcInstr_nClass_preamble.cpp rename to nCompiler/inst/include/nCompiler/predef/calcInstr_nClass/calcInstr_nClass_preamble.cpp diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/modelBase_nClass/modelBase_nClass_copyFiles.txt b/nCompiler/inst/include/nCompiler/predef/modelBase_nClass/modelBase_nClass_copyFiles.txt similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/modelBase_nClass/modelBase_nClass_copyFiles.txt rename to nCompiler/inst/include/nCompiler/predef/modelBase_nClass/modelBase_nClass_copyFiles.txt diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/modelBase_nClass/modelBase_nClass_cppContent.cpp b/nCompiler/inst/include/nCompiler/predef/modelBase_nClass/modelBase_nClass_cppContent.cpp similarity index 97% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/modelBase_nClass/modelBase_nClass_cppContent.cpp rename to nCompiler/inst/include/nCompiler/predef/modelBase_nClass/modelBase_nClass_cppContent.cpp index 1adef45d..58c04011 100644 --- a/nCompiler/inst/include/nCompiler/predefined_nClasses/modelBase_nClass/modelBase_nClass_cppContent.cpp +++ b/nCompiler/inst/include/nCompiler/predef/modelBase_nClass/modelBase_nClass_cppContent.cpp @@ -17,7 +17,7 @@ using namespace Rcpp; RESET_EIGEN_ERRORS return(true); } - double modelBase_nClass::calculate ( std::shared_ptr calcInstr ) { + double modelBase_nClass::calculate ( std::shared_ptr calcInstr ) { RESET_EIGEN_ERRORS Rprintf("modelBase_nClass calculate (should not see this)\n");; return(0.0); diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/modelBase_nClass/modelBase_nClass_filebase.txt b/nCompiler/inst/include/nCompiler/predef/modelBase_nClass/modelBase_nClass_filebase.txt similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/modelBase_nClass/modelBase_nClass_filebase.txt rename to nCompiler/inst/include/nCompiler/predef/modelBase_nClass/modelBase_nClass_filebase.txt diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/modelBase_nClass/modelBase_nClass_hContent.h b/nCompiler/inst/include/nCompiler/predef/modelBase_nClass/modelBase_nClass_hContent.h similarity index 97% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/modelBase_nClass/modelBase_nClass_hContent.h rename to nCompiler/inst/include/nCompiler/predef/modelBase_nClass/modelBase_nClass_hContent.h index c5e87de6..814b128f 100644 --- a/nCompiler/inst/include/nCompiler/predefined_nClasses/modelBase_nClass/modelBase_nClass_hContent.h +++ b/nCompiler/inst/include/nCompiler/predef/modelBase_nClass/modelBase_nClass_hContent.h @@ -7,12 +7,12 @@ #endif #include #include -#include "calcInstrList_nClass_c_.h" +#include "calcInstrList_nC_c_.h" class modelBase_nClass : public interface_resolver< genericInterfaceC >, public loadedObjectHookC { public: virtual bool ping ( ) ; - virtual double calculate ( std::shared_ptr calcInstr ) ; + virtual double calculate ( std::shared_ptr calcInstr ) ; modelBase_nClass ( ) ; virtual ~modelBase_nClass(); }; @@ -28,7 +28,7 @@ class modelClass_ : public modelBase_nClass { modelClass_() {}; std::vector< std::shared_ptr > nodeFxnPtrs; std::map name2index_map; - double calculate(std::shared_ptr calcInstrList) override { + double calculate(std::shared_ptr calcInstrList) override { double logProb(0.0); const auto& calcInstrVec = calcInstrList->calcInstrList.get(); auto calcInstr = calcInstrVec.cbegin(); diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/modelBase_nClass/modelBase_nClass_manifest.txt b/nCompiler/inst/include/nCompiler/predef/modelBase_nClass/modelBase_nClass_manifest.txt similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/modelBase_nClass/modelBase_nClass_manifest.txt rename to nCompiler/inst/include/nCompiler/predef/modelBase_nClass/modelBase_nClass_manifest.txt diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/modelBase_nClass/modelBase_nClass_post_cpp_compiler.txt b/nCompiler/inst/include/nCompiler/predef/modelBase_nClass/modelBase_nClass_post_cpp_compiler.txt similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/modelBase_nClass/modelBase_nClass_post_cpp_compiler.txt rename to nCompiler/inst/include/nCompiler/predef/modelBase_nClass/modelBase_nClass_post_cpp_compiler.txt diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/modelBase_nClass/modelBase_nClass_preamble.cpp b/nCompiler/inst/include/nCompiler/predef/modelBase_nClass/modelBase_nClass_preamble.cpp similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/modelBase_nClass/modelBase_nClass_preamble.cpp rename to nCompiler/inst/include/nCompiler/predef/modelBase_nClass/modelBase_nClass_preamble.cpp diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/nodeFxnBase_nClass/nodeFxnBase_nClass_copyFiles.txt b/nCompiler/inst/include/nCompiler/predef/nodeFxnBase_nClass/nodeFxnBase_nClass_copyFiles.txt similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/nodeFxnBase_nClass/nodeFxnBase_nClass_copyFiles.txt rename to nCompiler/inst/include/nCompiler/predef/nodeFxnBase_nClass/nodeFxnBase_nClass_copyFiles.txt diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/nodeFxnBase_nClass/nodeFxnBase_nClass_cppContent.cpp b/nCompiler/inst/include/nCompiler/predef/nodeFxnBase_nClass/nodeFxnBase_nClass_cppContent.cpp similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/nodeFxnBase_nClass/nodeFxnBase_nClass_cppContent.cpp rename to nCompiler/inst/include/nCompiler/predef/nodeFxnBase_nClass/nodeFxnBase_nClass_cppContent.cpp diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/nodeFxnBase_nClass/nodeFxnBase_nClass_filebase.txt b/nCompiler/inst/include/nCompiler/predef/nodeFxnBase_nClass/nodeFxnBase_nClass_filebase.txt similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/nodeFxnBase_nClass/nodeFxnBase_nClass_filebase.txt rename to nCompiler/inst/include/nCompiler/predef/nodeFxnBase_nClass/nodeFxnBase_nClass_filebase.txt diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/nodeFxnBase_nClass/nodeFxnBase_nClass_hContent.h b/nCompiler/inst/include/nCompiler/predef/nodeFxnBase_nClass/nodeFxnBase_nClass_hContent.h similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/nodeFxnBase_nClass/nodeFxnBase_nClass_hContent.h rename to nCompiler/inst/include/nCompiler/predef/nodeFxnBase_nClass/nodeFxnBase_nClass_hContent.h diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/nodeFxnBase_nClass/nodeFxnBase_nClass_manifest.txt b/nCompiler/inst/include/nCompiler/predef/nodeFxnBase_nClass/nodeFxnBase_nClass_manifest.txt similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/nodeFxnBase_nClass/nodeFxnBase_nClass_manifest.txt rename to nCompiler/inst/include/nCompiler/predef/nodeFxnBase_nClass/nodeFxnBase_nClass_manifest.txt diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/nodeFxnBase_nClass/nodeFxnBase_nClass_post_cpp_compiler.txt b/nCompiler/inst/include/nCompiler/predef/nodeFxnBase_nClass/nodeFxnBase_nClass_post_cpp_compiler.txt similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/nodeFxnBase_nClass/nodeFxnBase_nClass_post_cpp_compiler.txt rename to nCompiler/inst/include/nCompiler/predef/nodeFxnBase_nClass/nodeFxnBase_nClass_post_cpp_compiler.txt diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/nodeFxnBase_nClass/nodeFxnBase_nClass_preamble.cpp b/nCompiler/inst/include/nCompiler/predef/nodeFxnBase_nClass/nodeFxnBase_nClass_preamble.cpp similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/nodeFxnBase_nClass/nodeFxnBase_nClass_preamble.cpp rename to nCompiler/inst/include/nCompiler/predef/nodeFxnBase_nClass/nodeFxnBase_nClass_preamble.cpp diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/nodeInstr_nClass/nodeInstr_nClass_copyFiles.txt b/nCompiler/inst/include/nCompiler/predef/nodeInstr_nClass/nodeInstr_nClass_copyFiles.txt similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/nodeInstr_nClass/nodeInstr_nClass_copyFiles.txt rename to nCompiler/inst/include/nCompiler/predef/nodeInstr_nClass/nodeInstr_nClass_copyFiles.txt diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/nodeInstr_nClass/nodeInstr_nClass_cppContent.cpp b/nCompiler/inst/include/nCompiler/predef/nodeInstr_nClass/nodeInstr_nClass_cppContent.cpp similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/nodeInstr_nClass/nodeInstr_nClass_cppContent.cpp rename to nCompiler/inst/include/nCompiler/predef/nodeInstr_nClass/nodeInstr_nClass_cppContent.cpp diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/nodeInstr_nClass/nodeInstr_nClass_filebase.txt b/nCompiler/inst/include/nCompiler/predef/nodeInstr_nClass/nodeInstr_nClass_filebase.txt similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/nodeInstr_nClass/nodeInstr_nClass_filebase.txt rename to nCompiler/inst/include/nCompiler/predef/nodeInstr_nClass/nodeInstr_nClass_filebase.txt diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/nodeInstr_nClass/nodeInstr_nClass_hContent.h b/nCompiler/inst/include/nCompiler/predef/nodeInstr_nClass/nodeInstr_nClass_hContent.h similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/nodeInstr_nClass/nodeInstr_nClass_hContent.h rename to nCompiler/inst/include/nCompiler/predef/nodeInstr_nClass/nodeInstr_nClass_hContent.h diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/nodeInstr_nClass/nodeInstr_nClass_manifest.txt b/nCompiler/inst/include/nCompiler/predef/nodeInstr_nClass/nodeInstr_nClass_manifest.txt similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/nodeInstr_nClass/nodeInstr_nClass_manifest.txt rename to nCompiler/inst/include/nCompiler/predef/nodeInstr_nClass/nodeInstr_nClass_manifest.txt diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/nodeInstr_nClass/nodeInstr_nClass_post_cpp_compiler.txt b/nCompiler/inst/include/nCompiler/predef/nodeInstr_nClass/nodeInstr_nClass_post_cpp_compiler.txt similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/nodeInstr_nClass/nodeInstr_nClass_post_cpp_compiler.txt rename to nCompiler/inst/include/nCompiler/predef/nodeInstr_nClass/nodeInstr_nClass_post_cpp_compiler.txt diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/nodeInstr_nClass/nodeInstr_nClass_preamble.cpp b/nCompiler/inst/include/nCompiler/predef/nodeInstr_nClass/nodeInstr_nClass_preamble.cpp similarity index 100% rename from nCompiler/inst/include/nCompiler/predefined_nClasses/nodeInstr_nClass/nodeInstr_nClass_preamble.cpp rename to nCompiler/inst/include/nCompiler/predef/nodeInstr_nClass/nodeInstr_nClass_preamble.cpp diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstrList_nClass/calcInstrList_nClass_cppContent.cpp b/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstrList_nClass/calcInstrList_nClass_cppContent.cpp deleted file mode 100644 index c7309d21..00000000 --- a/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstrList_nClass/calcInstrList_nClass_cppContent.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* OPENER (Do not edit this comment) */ -#ifndef __calcInstrList_nClass_CPP -#define __calcInstrList_nClass_CPP -/* BODY (Do not edit this comment) */ -#ifndef R_NO_REMAP -#define R_NO_REMAP -#endif -#include -#include "calcInstrList_nClass_c_.h" -using namespace Rcpp; -// [[Rcpp::plugins(nCompiler_Eigen_plugin)]] -// [[Rcpp::depends(RcppParallel)]] -// [[Rcpp::depends(nCompiler)]] -// [[Rcpp::depends(Rcereal)]] - - calcInstrList_nClass::calcInstrList_nClass ( ) { -RESET_EIGEN_ERRORS -} - -// [[Rcpp::export(name = "new_calcInstrList_nClass")]] - SEXP new_calcInstrList_nClass ( ) { -RESET_EIGEN_ERRORS -return CREATE_NEW_NCOMP_OBJECT(calcInstrList_nClass);; -} - -// [[Rcpp::export(name = "set_CnClass_env_new_calcInstrList_nClass")]] - void set_CnClass_env_calcInstrList_nClass ( SEXP env ) { -RESET_EIGEN_ERRORS -SET_CNCLASS_ENV(calcInstrList_nClass, env);; -} - -// [[Rcpp::export(name = "get_CnClass_env_new_calcInstrList_nClass")]] - Rcpp::Environment get_CnClass_env_calcInstrList_nClass ( ) { -RESET_EIGEN_ERRORS -return GET_CNCLASS_ENV(calcInstrList_nClass);; -} - -NCOMPILER_INTERFACE( -calcInstrList_nClass, -NCOMPILER_FIELDS( -field("calcInstrList", &calcInstrList_nClass::calcInstrList) -), -NCOMPILER_METHODS() -) -#endif diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstrList_nClass/calcInstrList_nClass_filebase.txt b/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstrList_nClass/calcInstrList_nClass_filebase.txt deleted file mode 100644 index 6b2e8b13..00000000 --- a/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstrList_nClass/calcInstrList_nClass_filebase.txt +++ /dev/null @@ -1 +0,0 @@ -calcInstrList_nClass_c_ diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstrList_nClass/calcInstrList_nClass_hContent.h b/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstrList_nClass/calcInstrList_nClass_hContent.h deleted file mode 100644 index 47fdf85a..00000000 --- a/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstrList_nClass/calcInstrList_nClass_hContent.h +++ /dev/null @@ -1,24 +0,0 @@ -/* OPENER (Do not edit this comment) */ -#ifndef __calcInstrList_nClass_H -#define __calcInstrList_nClass_H -/* BODY (Do not edit this comment) */ -#ifndef R_NO_REMAP -#define R_NO_REMAP -#endif -#include -#include - -class calcInstrList_nClass : public interface_resolver< genericInterfaceC >, public loadedObjectHookC { -public: - calcInstrList_nClass ( ) ; - nList > calcInstrList; -}; - - SEXP new_calcInstrList_nClass ( ) ; - - void set_CnClass_env_calcInstrList_nClass ( SEXP env ) ; - - Rcpp::Environment get_CnClass_env_calcInstrList_nClass ( ) ; - - -#endif diff --git a/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstrList_nClass/calcInstrList_nClass_manifest.txt b/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstrList_nClass/calcInstrList_nClass_manifest.txt deleted file mode 100644 index eada98df..00000000 --- a/nCompiler/inst/include/nCompiler/predefined_nClasses/calcInstrList_nClass/calcInstrList_nClass_manifest.txt +++ /dev/null @@ -1,7 +0,0 @@ -list(saved_at = structure(1762608220.96116, class = c("POSIXct", -"POSIXt")), packet_name = "calcInstrList_nClass", elements = c("preamble", -"cppContent", "hContent", "filebase", "post_cpp_compiler", "copyFiles" -), files = list(preamble = "calcInstrList_nClass_preamble.cpp", - cppContent = "calcInstrList_nClass_cppContent.cpp", hContent = "calcInstrList_nClass_hContent.h", - filebase = "calcInstrList_nClass_filebase.txt", post_cpp_compiler = "calcInstrList_nClass_post_cpp_compiler.txt", - copyFiles = "calcInstrList_nClass_copyFiles.txt")) diff --git a/nCompiler/tests/testthat/nimble_tests/test-nimbleModel.R b/nCompiler/tests/testthat/nimble_tests/test-nimbleModel.R index bbc7dcfb..64815a8b 100644 --- a/nCompiler/tests/testthat/nimble_tests/test-nimbleModel.R +++ b/nCompiler/tests/testthat/nimble_tests/test-nimbleModel.R @@ -5,7 +5,7 @@ library(nCompiler) library(testthat) #nCompile(nodeFxnBase_nClass, nodeInstr_nClass, control=list(generate_predefined=TRUE)) -#nCompile(nodeInstr_nClass, calcInstr_nClass, modelBase_nClass, nodeFxnBase_nClass, calcInstrList_nClass, control=list(generate_predefined=TRUE)) +#nCompile(nodeInstr_nClass, calcInstr_nClass, modelBase_nClass, nodeFxnBase_nClass, calcInstrList_nC, control=list(generate_predefined=TRUE)) test_that("nimble model prototype works", { nodeVarInfo <- list(list(name = "x", nDim = 1), list(name = "mu", nDim = 1), @@ -29,7 +29,7 @@ test_that("nimble model prototype works", { ncm1 <- makeModel_nClass(modelVarInfo, list(my_nodeInfo), classname = "my_model") #undebug(nCompiler:::addGenericInterface_impl) #undebug(nCompiler:::nCompile_finish_nonpackage) - Cncm1 <- nCompile(modelBase_nClass, nodeFxnBase_nClass, calcInstrList_nClass, calcInstr_nClass, nodeInstr_nClass, ncm1, my_nodeFxn) + Cncm1 <- nCompile(modelBase_nClass, nodeFxnBase_nClass, calcInstrList_nC, calcInstr_nClass, nodeInstr_nClass, ncm1, my_nodeFxn) obj <- Cncm1$ncm1$new() obj$do_setup_node_mgmt() @@ -57,8 +57,8 @@ test_that("nimble model prototype works", { }) test_that("nodeInstr_nClass and calcInstr_nClass basics work", { - test <- nCompile(nodeInstr_nClass, calcInstr_nClass, calcInstrList_nClass, control=list(generate_predefined=TRUE)) - calcInstrList <- test$calcInstrList_nClass$new() + test <- nCompile(nodeInstr_nClass, calcInstr_nClass, calcInstrList_nC, control=list(generate_predefined=TRUE)) + calcInstrList <- test$calcInstrList_nC$new() calcInstr <- test$calcInstr_nClass$new() expect_equal(calcInstr$nodeInstrVec, list()) ni1 <- test$nodeInstr_nClass$new() @@ -93,7 +93,7 @@ varInfo <- nCompiler:::get_varInfo_from_nimbleModel(m) modelVars <- varInfo$vars # Try making a model with no nodeFxns ncm1 <- makeModel_nClass(modelVars, list(), classname = "my_model") -Cncm1 <- nCompile(modelBase_nClass, nodeFxnBase_nClass, calcInstrList_nClass, calcInstr_nClass, nodeInstr_nClass, ncm1) +Cncm1 <- nCompile(modelBase_nClass, nodeFxnBase_nClass, calcInstrList_nC, calcInstr_nClass, nodeInstr_nClass, ncm1) obj <- Cncm1$ncm1$new() obj$resize_from_list(varInfo$sizes) expect_equal(length(obj$x), 6) diff --git a/nCompiler/tests/testthat/status.txt b/nCompiler/tests/testthat/status.txt index 1ec550d3..084a8ae7 100644 --- a/nCompiler/tests/testthat/status.txt +++ b/nCompiler/tests/testthat/status.txt @@ -24,7 +24,7 @@ Some to-do notes: - Serialization testing is for mechanics but needs testing of core types and also membership networks. - stacktrace system could use the exportName for greater interpretability - test-indexing error-trapping tests are disabled and need attetion -- There is a note in test-nClass_interface that they don't work via test_package. +- There is a note in test-nC_inter that they don't work via test_package. - nDeparse of for loops needs to be fixed.