File tree Expand file tree Collapse file tree 1 file changed +24
-13
lines changed
Expand file tree Collapse file tree 1 file changed +24
-13
lines changed Original file line number Diff line number Diff line change 2121
2222#include < RcppEigen.h>
2323
24- extern " C" SEXP eigen_version (SEXP single_){
25- using Rcpp::_;
26- using Rcpp::IntegerVector;
27- using Rcpp::wrap;
28-
29- bool single = Rcpp::as<bool >(single_) ;
30- if ( single ){
31- return wrap ( 10000 * EIGEN_WORLD_VERSION +
32- 100 * EIGEN_MAJOR_VERSION +
33- EIGEN_MINOR_VERSION ) ;
24+ extern " C" {
25+ SEXP eigen_version (SEXP single_){
26+ using Rcpp::_;
27+ using Rcpp::IntegerVector;
28+
29+ BEGIN_RCPP;
30+ bool single = Rcpp::as<bool >(single_) ;
31+ if ( single ){
32+ return Rcpp::wrap ( 10000 * EIGEN_WORLD_VERSION +
33+ 100 * EIGEN_MAJOR_VERSION +
34+ EIGEN_MINOR_VERSION ) ;
35+ }
36+
37+ return IntegerVector::create (_[" major" ] = EIGEN_WORLD_VERSION,
38+ _[" minor" ] = EIGEN_MAJOR_VERSION,
39+ _[" patch" ] = EIGEN_MINOR_VERSION);
40+ END_RCPP;
3441 }
3542
36- return IntegerVector::create (_[" major" ] = EIGEN_WORLD_VERSION,
37- _[" minor" ] = EIGEN_MAJOR_VERSION,
38- _[" patch" ] = EIGEN_MINOR_VERSION);
43+ SEXP Eigen_SSE () {
44+ BEGIN_RCPP;
45+ return Rcpp::wrap (Eigen::SimdInstructionSetsInUse ());
46+ END_RCPP;
47+ }
3948}
4049
4150
51+
52+
You can’t perform that action at this time.
0 commit comments