File tree Expand file tree Collapse file tree 4 files changed +38
-12
lines changed
inst/include/RcppArmadillo/config Expand file tree Collapse file tree 4 files changed +38
-12
lines changed Original file line number Diff line number Diff line change 1+ 2025-11-13 Dirk Eddelbuettel <edd@debian.org>
2+
3+ * R/inline.R (inlineCxxPlugin): No longer special-case macOS for
4+ OpenMP but rely on "$(SHLIB_OPENMP_CFLAGS)" as everywhere else
5+
6+ * inst/include/RcppArmadillo/config/RcppArmadilloConfigGenerated.h.in:
7+ Refine macOS OpenMP detection, respect RCPPARMADILLO_MACOS_DISABLE_OPENMP
8+
9+ * inst/include/RcppArmadillo/config/RcppArmadilloConfig.h:
10+ ARMA_CRIPPLED_LAPACK is only defined if 'LEGACY' Armadillo selected
11+
1122025-11-04 Dirk Eddelbuettel <edd@debian.org>
213
314 * README.md: Minor edits
Original file line number Diff line number Diff line change 1- # # Copyright (C) 2010 - 2024 Dirk Eddelbuettel, Romain Francois and Douglas Bates
1+ # # Copyright (C) 2010 - 2025 Dirk Eddelbuettel, Romain Francois and Douglas Bates
22# #
33# # This file is part of RcppArmadillo.
44# #
1616# # along with RcppArmadillo. If not, see <http://www.gnu.org/licenses/>.
1717
1818inlineCxxPlugin <- function (... ) {
19- ismacos <- Sys.info()[[" sysname" ]] == " Darwin"
20- openmpflag <- if (ismacos ) " " else " $(SHLIB_OPENMP_CFLAGS)"
19+ openmpflag <- " $(SHLIB_OPENMP_CFLAGS)"
2120 plugin <- Rcpp :: Rcpp.plugin.maker(include.before = " #include <RcppArmadillo.h>" ,
2221 libs = paste(openmpflag , " $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)" ),
2322 package = " RcppArmadillo" )
Original file line number Diff line number Diff line change 11
22// RcppArmadilloConfig.h: Rcpp/Armadillo glue
33//
4- // Copyright (C) 2010 - 2022 Dirk Eddelbuettel, Romain Francois and Douglas Bates
5- // Copyright (C) 2016 - 2022 George G. Vega Yon
6- // Copyright (C) 2017 - 2022 Serguei Sokol
4+ // Copyright (C) 2010 - 2025 Dirk Eddelbuettel, Romain Francois and Douglas Bates
5+ // Copyright (C) 2016 - 2025 George G. Vega Yon
6+ // Copyright (C) 2017 - 2025 Serguei Sokol
77//
88// This file is part of RcppArmadillo.
99//
9999 // R can be built with its own Rlapack library, or use an external
100100 // one. Only the latter has zgesdd, a complex-valued SVD using divide-and-conquer
101101 // on Windows we do not assume ZGESDD
102- #define ARMA_CRIPPLED_LAPACK 1
102+ //
103+ // Update 2025-Nov: R now generally has good enough LAPACK/BLAS, and newer Arma
104+ // versions whine so protecting this now for use with Armadillo older than 15.*
105+ #if defined(ARMA_SELECTED_LEGACY_VERSION)
106+ #define ARMA_CRIPPLED_LAPACK 1
107+ #endif
103108 // on Windows we can now assume OpenMP with Rtools / gcc 4.9.3
104109 // note that performance is said to still be poor
105110 // cf https://cran.r-project.org/doc/manuals/r-devel/R-admin.html#The-MinGW_002dw64-toolchain
Original file line number Diff line number Diff line change 11
2- // RcppArmadilloGenerated .h: Autoconf-updated file for LAPACK and OpenMP choices
2+ // RcppArmadilloConfigGenerated .h: Autoconf-updated file for LAPACK and OpenMP choices
33//
4- // Copyright (C) 2013 - 2021 Dirk Eddelbuettel
4+ // Copyright (C) 2013 - 2025 Dirk Eddelbuettel
5+ // 2025 James J. Balamuta
56//
67// This file is part of RcppArmadillo.
78//
2122#ifndef RcppArmadillo__RcppArmadilloConfigGenerated__h
2223#define RcppArmadillo__RcppArmadilloConfigGenerated__h
2324
24- #ifndef ARMA_USE_OPENMP
25- // from configure test for OpenMP based on how R is configured, and whether g++ new enough
26- @ARMA_HAVE_OPENMP @
25+ // macOS special case as discussed in https://github.com/RcppCore/RcppArmadillo/issues/493
26+ #if !defined(ARMA_USE_OPENMP )
27+ #if defined(__APPLE__ ) && defined(_OPENMP )
28+ // User has OpenMP available, but check if they want it disabled
29+ #ifndef RCPPARMADILLO_MACOS_DISABLE_OPENMP
30+ #define ARMA_USE_OPENMP 1
31+ #else
32+ #define ARMA_DONT_USE_OPENMP 1
33+ #endif
34+ #else
35+ // from configure test for OpenMP based on how R is configured
36+ @ARMA_HAVE_OPENMP @
37+ #endif
2738#endif
2839
2940#endif
You can’t perform that action at this time.
0 commit comments