Skip to content

Commit 2b56167

Browse files
committed
TLS for gcc 4.6
1 parent 1ab9efd commit 2b56167

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/library/blas/xgemm.cc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include <map>
1818
#include <string>
1919
#include <sstream>
20-
#include <thread>
2120
#include <stdio.h>
2221
#include <string.h>
2322
#include <clBLAS.h>
@@ -28,6 +27,16 @@
2827
// #include <functor_selector.h>
2928
#include "xgemm.h"
3029

30+
//#define GCC_VERSION (__GNUC__ * 10000 \
31+
// + __GNUC_MINOR__ * 100 \
32+
// + __GNUC_PATCHLEVEL__)
33+
34+
#ifdef _WIN32
35+
//#include <thread>
36+
#else
37+
#include <pthread.h>
38+
#endif
39+
3140
/******************************************************************************
3241
* Row major -> column major
3342
*****************************************************************************/
@@ -140,6 +149,7 @@ void makeGemmKernel(
140149
#if defined( _WIN32 )
141150
__declspec( thread ) static kernel_map_t *kernel_map = 0;
142151
#else
152+
#include <pthread.h>
143153
__thread static kernel_map_t *kernel_map = 0;
144154
#endif
145155
if (!kernel_map) {

0 commit comments

Comments
 (0)