File tree 1 file changed +3
-12
lines changed
onnxruntime/core/mlas/lib
1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -2479,21 +2479,12 @@ MlasReadTimeStampCounter(void)
2479
2479
// Aligned buffer for GEMM packing, etc.
2480
2480
//
2481
2481
2482
- #ifdef MLAS_THREAD_LOCAL
2483
- #error MLAS_THREAD_LOCAL was previously defined
2484
- #endif
2485
- #if defined(_MSC_VER)
2486
- #define MLAS_THREAD_LOCAL __declspec (thread)
2487
- #else
2488
- #define MLAS_THREAD_LOCAL
2489
- #endif
2490
-
2491
2482
constexpr size_t ThreadedBufAlignment = 64 ;
2492
- extern MLAS_THREAD_LOCAL size_t ThreadedBufSize;
2483
+ extern thread_local size_t ThreadedBufSize;
2493
2484
#ifdef _MSC_VER
2494
- extern MLAS_THREAD_LOCAL std::unique_ptr<uint8_t , decltype(&_aligned_free)> ThreadedBufHolder;
2485
+ extern thread_local std::unique_ptr<uint8_t , decltype(&_aligned_free)> ThreadedBufHolder;
2495
2486
#else
2496
- extern MLAS_THREAD_LOCAL std::unique_ptr<uint8_t , decltype(&free)> ThreadedBufHolder;
2487
+ extern thread_local std::unique_ptr<uint8_t , decltype(&free)> ThreadedBufHolder;
2497
2488
#endif
2498
2489
2499
2490
MLAS_FORCEINLINE
You can’t perform that action at this time.
0 commit comments