diff --git a/ChangeLog b/ChangeLog index 003cfe77..489962e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2023-12-09 Dirk Eddelbuettel + + * inst/tinytest/test_misc.R: Add tests for thread throttling + 2023-12-03 Dirk Eddelbuettel * DESCRIPTION (Version, Date): RcppArmadillo 0.12.6.6.1 diff --git a/inst/tinytest/test_misc.R b/inst/tinytest/test_misc.R index abd760fe..c52b5d24 100644 --- a/inst/tinytest/test_misc.R +++ b/inst/tinytest/test_misc.R @@ -1,6 +1,6 @@ #!/usr/bin/r -t # -# Copyright (C) 2021 Dirk Eddelbuettel +# Copyright (C) 2021-2023 Dirk Eddelbuettel # # This file is part of RcppArmadillo. # @@ -36,3 +36,10 @@ armadillo_set_seed(42L) # no test as we have no (current) access cxxflags <- RcppArmadillo:::RcppArmadilloCxxFlags() expect_true(is.character(cxxflags)) expect_stdout(RcppArmadillo:::CxxFlags()) + +## 'set number of threads' helper -- adding simple test +expect_true(is.integer(armadillo_get_number_of_omp_threads())) +expect_silent(armadillo_set_number_of_omp_threads(2)) +## startup throttle/restore helpers +expect_silent(armadillo_throttle_cores()) +expect_silent(armadillo_reset_cores())