Skip to content

Commit

Permalink
Eigen using BLAS
Browse files Browse the repository at this point in the history
  • Loading branch information
Marwolaeth committed Jun 6, 2023
1 parent 73deebc commit d9eafa4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main/main.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ bm <- microbenchmark(
)
bm

bm <- microbenchmark(
bm_xy <- microbenchmark(
standard = polychoric(table(gss12_values$valorig, gss12_values$valeql)),
polycorr = polycorr(gss12_values$valorig, gss12_values$valeql),
times = 32L,
control = list(warmup = 6)
)
bm
bm_xy
2 changes: 2 additions & 0 deletions src/Makevars
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
CXX_STD = CXX11
PKG_CPPFLAGS = -I../inst/include/
ARCH=x64
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) $(SHLIB_OPENMP_CXXFLAGS)
PKG_CXXFLAGS = -DEIGEN_USE_BLAS $(SHLIB_OPENMP_CXXFLAGS)
2 changes: 2 additions & 0 deletions src/Makevars.win
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
CXX_STD = CXX11
PKG_CPPFLAGS = -I../inst/include/
ARCH=x64
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) $(SHLIB_OPENMP_CXXFLAGS)
PKG_CXXFLAGS = -DEIGEN_USE_BLAS $(SHLIB_OPENMP_CXXFLAGS)
2 changes: 2 additions & 0 deletions src/functions.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-

#define EIGEN_USE_BLAS

#include <Rcpp.h>
#include <RcppEigen.h>
// [[Rcpp::depends(RcppEigen)]]
Expand Down

0 comments on commit d9eafa4

Please sign in to comment.