-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update implementations & add multi-threading eigh and interfaces
- Loading branch information
qyli
committed
Feb 7, 2024
1 parent
c9a8ef7
commit a4de69a
Showing
5 changed files
with
152 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# global variables to control multi-threading behaviors | ||
global nthreads_mul::Int64 | ||
global nthreads_eigh::Int64 | ||
global nthreads_svd::Int64 | ||
global nthreads_add::Int64 | ||
|
||
function set_num_threads_mul(n::Int64) | ||
@assert 1 ≤ n ≤ Threads.nthreads() | ||
global nthreads_mul = n | ||
return nothing | ||
end | ||
get_num_threads_mul() = nthreads_mul | ||
|
||
function set_num_threads_add(n::Int64) | ||
@assert 1 ≤ n ≤ Threads.nthreads() | ||
global nthreads_add = n | ||
return nothing | ||
end | ||
get_num_threads_add() = nthreads_add | ||
|
||
function set_num_threads_svd(n::Int64) | ||
@assert 1 ≤ n ≤ Threads.nthreads() | ||
global nthreads_svd = n | ||
return nothing | ||
end | ||
get_num_threads_svd() = nthreads_svd | ||
|
||
function set_num_threads_eigh(n::Int64) | ||
@assert 1 ≤ n ≤ Threads.nthreads() | ||
global nthreads_eigh = n | ||
return nothing | ||
end | ||
get_num_threads_eigh() = nthreads_eigh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters