[Rcpp-commits] r1876 - in pkg/Rcpp: . inst inst/include/Rcpp/sugar/functions
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jul 28 17:27:30 CEST 2010
Author: romain
Date: 2010-07-28 17:27:30 +0200 (Wed, 28 Jul 2010)
New Revision: 1876
Modified:
pkg/Rcpp/DESCRIPTION
pkg/Rcpp/NEWS
pkg/Rcpp/inst/ChangeLog
pkg/Rcpp/inst/include/Rcpp/sugar/functions/exp.h
Log:
solaris/suncc iteration 0
Modified: pkg/Rcpp/DESCRIPTION
===================================================================
--- pkg/Rcpp/DESCRIPTION 2010-07-28 15:27:05 UTC (rev 1875)
+++ pkg/Rcpp/DESCRIPTION 2010-07-28 15:27:30 UTC (rev 1876)
@@ -1,6 +1,6 @@
Package: Rcpp
Title: Seamless R and C++ Integration
-Version: 0.8.5
+Version: 0.8.5.1
Date: $Date$
Author: Dirk Eddelbuettel and Romain Francois, with contributions
by Simon Urbanek, David Reiss and Douglas Bates; based on code written during
Modified: pkg/Rcpp/NEWS
===================================================================
--- pkg/Rcpp/NEWS 2010-07-28 15:27:05 UTC (rev 1875)
+++ pkg/Rcpp/NEWS 2010-07-28 15:27:30 UTC (rev 1876)
@@ -1,3 +1,7 @@
+0.8.6 (future)
+
+ o patch to comply with solaris/suncc stricter standards
+
0.8.5 2010-07-25
o speed improvements. Vector::names, RObject::slot have been improved
Modified: pkg/Rcpp/inst/ChangeLog
===================================================================
--- pkg/Rcpp/inst/ChangeLog 2010-07-28 15:27:05 UTC (rev 1875)
+++ pkg/Rcpp/inst/ChangeLog 2010-07-28 15:27:30 UTC (rev 1876)
@@ -1,3 +1,7 @@
+2010-07-28 Romain Francois <romain at r-enthusiasts.com>
+
+ * inst/include/Rcpp/sugar/exp.h: adapt to stricter standards on solaris/suncc
+
2010-07-25 Dirk Eddelbuettel <edd at debian.org>
* DESCRIPTION: Release 0.8.5
Modified: pkg/Rcpp/inst/include/Rcpp/sugar/functions/exp.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/sugar/functions/exp.h 2010-07-28 15:27:05 UTC (rev 1875)
+++ pkg/Rcpp/inst/include/Rcpp/sugar/functions/exp.h 2010-07-28 15:27:30 UTC (rev 1876)
@@ -30,7 +30,7 @@
public:
typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
static inline double get( STORAGE x){
- return Rcpp::traits::is_na<RTYPE>(x) ? NA_INTEGER : exp(x) ;
+ return Rcpp::traits::is_na<RTYPE>(x) ? NA_REAL : exp(x) ;
}
} ;
@@ -43,6 +43,22 @@
}
} ;
+template <>
+class exp__impl<false,INTSXP>{
+public:
+ static inline double get( int x){
+ return exp( static_cast<double>(x) ) ;
+ }
+} ;
+
+template <>
+class exp__impl<true,INTSXP>{
+public:
+ static inline double get( int x){
+ return Rcpp::traits::is_na<INTSXP>(x) ? NA_REAL : exp( static_cast<double>(x) ) ;
+ }
+} ;
+
template <int RTYPE, bool NA, typename T>
class Exp : public Rcpp::VectorBase< REALSXP ,NA, Exp<RTYPE,NA,T> > {
More information about the Rcpp-commits
mailing list