9#ifndef FIMS_INTERFACE_HPP
10#define FIMS_INTERFACE_HPP
27#define FIMS_REPORT_F(name, F) \
28 if (isDouble<Type>::value && \
29 F->current_parallel_region < static_cast<Type>(0)) { \
30 Rf_defineVar(Rf_install(#name), PROTECT(asSEXP(name)), F->report); \
34#define FIMS_REPORT_F_(name, obj, F) \
35 if (isDouble<Type>::value && \
36 F->current_parallel_region < static_cast<Type>(0)) { \
37 Rf_defineVar(Rf_install(name), PROTECT(asSEXP(obj)), F->report); \
41#define ADREPORT_F(name, F) F->reportvector.push(name, #name);
43template <
typename Type>
44vector<Type> ADREPORTvector(vector<vector<Type> > x) {
45 int outer_dim = x.size();
47 for (
int i = 0; i < outer_dim; i++) {
50 vector<Type> res(dim);
52 for (
int i = 0; i < outer_dim; i++) {
53 int inner_dim = x(i).size();
54 for (
int j = 0; j < inner_dim; j++) {
62#define FIMS_SIMULATE_F(F) if (isDouble<Type>::value && F->do_simulate)
70#define FIMS_SIMULATE_F(F)
74#define FIMS_REPORT_F(name, F)
78#define ADREPORT_F(name, F)