Xsimd C++ Header-Only Library Files

This header-only library provides modern, portable C++ wrappers for SIMD intrinsics and parallelized, optimized math implementations (SSE, AVX, NEON, AVX512). By placing this library in this package, we offer an efficient distribution system for Xsimd < https://github.com/xtensor-stack/xsimd> for R packages using CRAN.


RcppXsimd

Build Status CRAN_Status_Badge 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

RcppXsimd is being developed in R Studio.

Acknowledgements

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

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("RcppXsimd")

7.1.6-2 by Marc A. Suchard, 9 months ago


Browse source code at https://github.com/cran/RcppXsimd


Authors: Marc A. Suchard [aut, cre] , Andrew J. Holbrook [aut] , Observational Health Data Sciences and Informatics [cph] , Johan Mabille [cph, ctb] (author and copyright holder of Xsimd library under a BSD-3 license) , Sylvain Corlay [cph, ctb] (author and copyright holder of Xsimd library under a BSD-3 license) , Alexander J. Lee [cph, ctb] (author and copyright holder of FeatureDetector library under a CC0 1.0 license)


Documentation:   PDF Manual  


BSD_3_clause + file LICENSE license


Imports Rcpp

Suggests testthat

Linking to Rcpp


Linked to by rchime.


See at CRAN