Remove omp_get_max_threads in data. (#7588)
This commit is contained in:
@@ -263,17 +263,6 @@ inline int32_t OmpSetNumThreads(int32_t* p_threads) {
|
||||
return nthread_original;
|
||||
}
|
||||
|
||||
inline int32_t OmpSetNumThreadsWithoutHT(int32_t* p_threads) {
|
||||
auto& threads = *p_threads;
|
||||
int32_t nthread_original = omp_get_max_threads();
|
||||
if (threads <= 0) {
|
||||
threads = nthread_original;
|
||||
}
|
||||
threads = std::min(threads, OmpGetThreadLimit());
|
||||
omp_set_num_threads(threads);
|
||||
return nthread_original;
|
||||
}
|
||||
|
||||
inline int32_t OmpGetNumThreads(int32_t n_threads) {
|
||||
if (n_threads <= 0) {
|
||||
n_threads = std::min(omp_get_num_procs(), omp_get_max_threads());
|
||||
|
||||
Reference in New Issue
Block a user