Description Usage Value Examples
Determine if CPU supports AVX512 SIMD instructions
1 |
Boolean
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
if (supportsAVX512()) {
Sys.setenv(PKG_CPPFLAGS = getAVX512Flags())
Rcpp::sourceCpp(verbose = TRUE, code='
// [[Rcpp::plugins(cpp14)]]
// [[Rcpp::depends(RcppXsimd)]]
#include <Rcpp.h>
#include "xsimd/xsimd.hpp"
// [[Rcpp::export]]
void demoAVX512() {
xsimd::batch<double, 8> a(1.0);
xsimd::batch<double, 8> b(1.0);
Rcpp::Rcout << a << " + " << b << " = " << (a + b) << std::endl;
}')
demoAVX512()
} else {
message("AVX512 is not supported")
}
## End(Not run)
|
AVX512 is not supported
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.