[Rcpp-commits] r3383 - pkg/RcppArmadillo/inst/include/RcppArmadillo
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Nov 18 15:20:13 CET 2011
Author: edd
Date: 2011-11-18 15:20:12 +0100 (Fri, 18 Nov 2011)
New Revision: 3383
Modified:
pkg/RcppArmadillo/inst/include/RcppArmadillo/Mat_meat.h
Log:
use u32 for n_elem
Modified: pkg/RcppArmadillo/inst/include/RcppArmadillo/Mat_meat.h
===================================================================
--- pkg/RcppArmadillo/inst/include/RcppArmadillo/Mat_meat.h 2011-11-17 14:34:02 UTC (rev 3382)
+++ pkg/RcppArmadillo/inst/include/RcppArmadillo/Mat_meat.h 2011-11-18 14:20:12 UTC (rev 3383)
@@ -38,14 +38,14 @@
template <typename eT, int RTYPE, bool NA, typename VECTOR>
- inline void fill_ptr__impl( eT* ptr, const Rcpp::VectorBase<RTYPE,NA,VECTOR>& X, int n_elem, ::Rcpp::traits::true_type ){
+ inline void fill_ptr__impl( eT* ptr, const Rcpp::VectorBase<RTYPE,NA,VECTOR>& X, u32 n_elem, ::Rcpp::traits::true_type ){
for( u32 i=0; i<n_elem; ++i){
ptr[i] = Rcpp::internal::caster< typename Rcpp::traits::storage_type<RTYPE>::type, eT>( X[i] ) ;
}
}
template <typename eT, int RTYPE, bool NA, typename VECTOR>
- inline void fill_ptr__impl( eT* ptr, const Rcpp::VectorBase<RTYPE,NA,VECTOR>& X, int n_elem, ::Rcpp::traits::false_type ){
+ inline void fill_ptr__impl( eT* ptr, const Rcpp::VectorBase<RTYPE,NA,VECTOR>& X, u32 n_elem, ::Rcpp::traits::false_type ){
for( u32 i=0; i<n_elem; ++i){
ptr[i] = X[i] ;
}
@@ -53,7 +53,7 @@
template <typename eT, int RTYPE, bool NA, typename VECTOR>
- inline void fill_ptr( eT* ptr, const Rcpp::VectorBase<RTYPE,NA,VECTOR>& X, int n_elem ){
+ inline void fill_ptr( eT* ptr, const Rcpp::VectorBase<RTYPE,NA,VECTOR>& X, u32 n_elem ){
return fill_ptr__impl<eT, RTYPE, NA, VECTOR>( ptr, X, n_elem,
typename ::Rcpp::traits::r_sexptype_needscast<eT>()
) ;
More information about the Rcpp-commits
mailing list