Skip to content

Commit 53c85d1

Browse files
authored
Merge pull request #157 from JuliaLinearAlgebra/im/nvplthreads
Add support for setting/getting theading information for NVPL
2 parents e816fd6 + 2f7a8b5 commit 53c85d1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/threading.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,18 @@
3636
* libblastrampoline will propagate the call through to its loaded libraries as long as the
3737
* library exposes a getter/setter method named in one of these arrays, and its signature
3838
* matches the common theme here.
39+
*
40+
* For the getters, the function signature should match:
41+
* int get_num_threads()
42+
* For the setters, the function signature should match:
43+
* void set_num_threads(int numThreads)
3944
*/
4045
static char * getter_names[MAX_THREADING_NAMES] = {
4146
"openblas_get_num_threads",
4247
"bli_thread_get_num_threads",
48+
// There isn't a non-max NVPL function for this
49+
"nvpl_blas_get_max_threads",
50+
"nvpl_lapack_get_max_threads",
4351
// We special-case MKL in the lookup loop below
4452
//"MKL_Domain_Get_Max_Threads",
4553
NULL
@@ -48,6 +56,8 @@ static char * getter_names[MAX_THREADING_NAMES] = {
4856
static char * setter_names[MAX_THREADING_NAMES] = {
4957
"openblas_set_num_threads",
5058
"bli_thread_set_num_threads",
59+
"nvpl_blas_set_num_threads",
60+
"nvpl_lapack_set_num_threads",
5161
// We special-case MKL in the lookup loop below
5262
//"MKL_Domain_Set_Num_Threads",
5363
NULL

0 commit comments

Comments
 (0)