Skip to content
/ RcppXsimd Public

❗ This is a read-only mirror of the CRAN R package repository. RcppXsimd — Xsimd C++ Header-Only Library Files

License

Notifications You must be signed in to change notification settings

cran/RcppXsimd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RcppXsimd

CRAN_Status_Badge

Overview

This library provides an Rcpp wrapper around Xsimd that is a modern, portable C++14 header-only library for SIMD intrinsics and parallelized, optimized math implementations.

Example

library(RcppXsimd)
?supportsAVX

if (supportsAVX()) {
  Sys.setenv(PKG_CPPFLAGS = "-mavx")
  Rcpp::sourceCpp(verbose = TRUE, code='
    // [[Rcpp::plugins(cpp14)]]
    // [[Rcpp::depends(RcppXsimd)]]

    #include <Rcpp.h>
    #include "xsimd/xsimd.hpp"

    // [[Rcpp::export]]
    void demoAVX() {
      xsimd::batch<double, 4> a(1.0);
      xsimd::batch<double, 4> b(1.0);
      Rcpp::Rcout << a << " + " << b << " = " << (a + b) << std::endl;
    }')
  demoAVX()
} else {
  message("AVX is not supported")
}

Development status

Build Status

Build status

Acknowledgements

  • This project is supported in part through the National Science Foundation grant DMS 1264153.

About

❗ This is a read-only mirror of the CRAN R package repository. RcppXsimd — Xsimd C++ Header-Only Library Files

Resources

License

Stars

Watchers

Forks

Packages

No packages published