mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
16 lines
330 B
C++
16 lines
330 B
C++
|
|
#include <caffe2/utils/threadpool/thread_pool_guard.h>
|
||
|
|
|
||
|
|
namespace caffe2 {
|
||
|
|
|
||
|
|
thread_local bool _NoPThreadPoolGuard_enabled = false;
|
||
|
|
|
||
|
|
bool _NoPThreadPoolGuard::is_enabled() {
|
||
|
|
return _NoPThreadPoolGuard_enabled;
|
||
|
|
}
|
||
|
|
|
||
|
|
void _NoPThreadPoolGuard::set_enabled(bool enabled) {
|
||
|
|
_NoPThreadPoolGuard_enabled = enabled;
|
||
|
|
}
|
||
|
|
|
||
|
|
} // namespace at
|