9#ifndef FIMS_INTERFACE_HPP
10#define FIMS_INTERFACE_HPP
30#define FIMS_REPORT_F(name, F) \
31 if (isDouble<Type>::value && F != nullptr && \
32 F->current_parallel_region < static_cast<Type>(0)) { \
33 Rf_defineVar(Rf_install(#name), PROTECT(asSEXP(name)), F->report); \
37#define FIMS_REPORT_F_(name, obj, F) \
38 if (isDouble<Type>::value && F != nullptr && \
39 F->current_parallel_region < static_cast<Type>(0)) { \
40 Rf_defineVar(Rf_install(name), PROTECT(asSEXP(obj)), F->report); \
44#define ADREPORT_F(name, F) \
45 if (F != nullptr) F->reportvector.push(name, #name);
47template <
typename Type>
48vector<Type> ADREPORTvector(vector<vector<Type> > x) {
49 int outer_dim = x.size();
51 for (
int i = 0; i < outer_dim; i++) {
54 vector<Type> res(dim);
56 for (
int i = 0; i < outer_dim; i++) {
57 int inner_dim = x(i).size();
58 for (
int j = 0; j < inner_dim; j++) {
66#define FIMS_SIMULATE_F(F) \
67 if (isDouble<Type>::value && F != nullptr && F->do_simulate)
75#define FIMS_SIMULATE_F(F)
79#define FIMS_REPORT_F(name, F)
83#define ADREPORT_F(name, F)
Include this file to extract declarations only.