Skip to content

Commit

Permalink
Add tests for thread throttling management added in 0.12.6.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Dec 9, 2023
1 parent 8086574 commit 471542b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2023-12-09 Dirk Eddelbuettel <[email protected]>

* inst/tinytest/test_misc.R: Add tests for thread throttling

2023-12-03 Dirk Eddelbuettel <[email protected]>

* DESCRIPTION (Version, Date): RcppArmadillo 0.12.6.6.1
Expand Down
9 changes: 8 additions & 1 deletion inst/tinytest/test_misc.R
Original file line number Diff line number Diff line change
@@ -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.
#
Expand Down Expand Up @@ -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())

0 comments on commit 471542b

Please sign in to comment.