26 #ifndef TMB_HAVE_THREAD_SAFE_R 28 inline SEXP Ts_getAttrib(SEXP x, SEXP y) {
32 ans = Rf_getAttrib(x, y);
37 inline SEXP Ts_STRING_ELT(SEXP x,
size_t i) {
41 ans = STRING_ELT(x, i);
46 inline const char* Ts_CHAR(SEXP x) {
55 inline SEXP Ts_VECTOR_ELT(SEXP x,
size_t i) {
59 ans = VECTOR_ELT(x, i);
64 inline R_len_t Ts_length(SEXP x) {
73 inline int* Ts_INTEGER(SEXP x) {
82 inline double* Ts_REAL(SEXP x) {
92 inline void Ts_GetRNGstate() {
101 inline Rboolean Ts_isNumeric(SEXP x) {
105 ans = Rf_isNumeric(x);
110 inline int Ts_LENGTH(SEXP x) {
119 inline R_xlen_t Ts_XLENGTH(SEXP x) {
128 inline SEXP Ts_install(
const char *x) {
137 inline SEXP Ts_findVar(SEXP x, SEXP y) {
141 ans = Rf_findVar(x, y);
146 inline SEXP Ts_ENCLOS(SEXP x) {
155 inline void Ts_warning(
const char *x, ...) {
156 if (omp_get_thread_num() == 0) {
162 #define TMB_HAVE_THREAD_SAFE_R 163 #define Rf_getAttrib Ts_getAttrib 164 #define STRING_ELT Ts_STRING_ELT 166 #define CHAR(x) Ts_CHAR(x) 167 #define VECTOR_ELT Ts_VECTOR_ELT 168 #define Rf_length Ts_length 169 #define INTEGER Ts_INTEGER 171 #define GetRNGstate Ts_GetRNGstate 172 #define Rf_isNumeric Ts_isNumeric 173 #define LENGTH Ts_LENGTH 174 #define XLENGTH Ts_XLENGTH 175 #define Rf_install Ts_install 176 #define Rf_findVar Ts_findVar 177 #define ENCLOS Ts_ENCLOS 178 #define Rf_warning Ts_warning 183 #undef TMB_HAVE_THREAD_SAFE_R 187 #define CHAR(x) R_CHAR(x) 201 #endif // TMB_HAVE_THREAD_SAFE_R