File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1+ 2023-12-09 Dirk Eddelbuettel <
[email protected] >
2+
3+ * inst/tinytest/test_misc.R: Add tests for thread throttling
4+
152023-12-03 Dirk Eddelbuettel <
[email protected] >
26
37 * DESCRIPTION (Version, Date): RcppArmadillo 0.12.6.6.1
Original file line number Diff line number Diff line change 11# !/usr/bin/r -t
22#
3- # Copyright (C) 2021 Dirk Eddelbuettel
3+ # Copyright (C) 2021-2023 Dirk Eddelbuettel
44#
55# This file is part of RcppArmadillo.
66#
@@ -36,3 +36,10 @@ armadillo_set_seed(42L) # no test as we have no (current) access
3636cxxflags <- RcppArmadillo ::: RcppArmadilloCxxFlags()
3737expect_true(is.character(cxxflags ))
3838expect_stdout(RcppArmadillo ::: CxxFlags())
39+
40+ # # 'set number of threads' helper -- adding simple test
41+ expect_true(is.integer(armadillo_get_number_of_omp_threads()))
42+ expect_silent(armadillo_set_number_of_omp_threads(2 ))
43+ # # startup throttle/restore helpers
44+ expect_silent(armadillo_throttle_cores())
45+ expect_silent(armadillo_reset_cores())
You can’t perform that action at this time.
0 commit comments