[Pomp-commits] r330 - pkg/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 28 13:15:48 CEST 2010


Author: kingaa
Date: 2010-09-28 13:15:48 +0200 (Tue, 28 Sep 2010)
New Revision: 330

Modified:
   pkg/src/pomp_internal.h
Log:
- use R_STATIC macro


Modified: pkg/src/pomp_internal.h
===================================================================
--- pkg/src/pomp_internal.h	2010-09-26 17:06:12 UTC (rev 329)
+++ pkg/src/pomp_internal.h	2010-09-28 11:15:48 UTC (rev 330)
@@ -42,7 +42,7 @@
 /* resample.c */
 SEXP systematic_resampling(SEXP weights);
 
-static inline SEXP makearray (int rank, int *dim) {
+static R_INLINE SEXP makearray (int rank, int *dim) {
   int nprotect = 0;
   int *dimp, k;
   double *xp;
@@ -57,7 +57,7 @@
   return x;
 }
 
-static inline SEXP matchnames (SEXP x, SEXP names) {
+static R_INLINE SEXP matchnames (SEXP x, SEXP names) {
   int nprotect = 0;
   int n = length(names);
   int *idx, k;
@@ -73,7 +73,7 @@
   return index;
 }
 
-static inline SEXP match_char_to_names (SEXP x, int n, char **names) {
+static R_INLINE SEXP match_char_to_names (SEXP x, int n, char **names) {
   int nprotect = 0;
   int *idx, k;
   SEXP index, nm;
@@ -94,7 +94,7 @@
   return index;
 }
 
-static inline void setrownames (SEXP x, SEXP names, int n) {
+static R_INLINE void setrownames (SEXP x, SEXP names, int n) {
   int nprotect = 0;
   SEXP dimnms, nm;
   PROTECT(nm = AS_CHARACTER(names)); nprotect++;
@@ -104,11 +104,11 @@
   UNPROTECT(nprotect);
 }
 
-static inline double expit (double x) {
+static R_INLINE double expit (double x) {
   return 1.0/(1.0 + exp(-x));
 }
 
-static inline double logit (double x) {
+static R_INLINE double logit (double x) {
   return log(x/(1-x));
 }
 



More information about the pomp-commits mailing list