Skip to content

Commit 471542b

Browse files
committed
Add tests for thread throttling management added in 0.12.6.6.0
1 parent 8086574 commit 471542b

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2023-12-09 Dirk Eddelbuettel <[email protected]>
2+
3+
* inst/tinytest/test_misc.R: Add tests for thread throttling
4+
15
2023-12-03 Dirk Eddelbuettel <[email protected]>
26

37
* DESCRIPTION (Version, Date): RcppArmadillo 0.12.6.6.1

inst/tinytest/test_misc.R

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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
3636
cxxflags <- RcppArmadillo:::RcppArmadilloCxxFlags()
3737
expect_true(is.character(cxxflags))
3838
expect_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())

0 commit comments

Comments
 (0)