@@ -99,7 +99,11 @@ static void inner_basic_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *ra
99
99
FLOAT * d = (FLOAT * )args -> b + (k + k * lda ) * COMPSIZE ;
100
100
FLOAT * sbb = sb ;
101
101
102
+ #if _STDC_VERSION__ >= 201112L
103
+ _Atomic BLASLONG * flag = (_Atomic BLASLONG * )args -> d ;
104
+ #else
102
105
volatile BLASLONG * flag = (volatile BLASLONG * )args -> d ;
106
+ #endif
103
107
104
108
blasint * ipiv = (blasint * )args -> c ;
105
109
@@ -177,7 +181,12 @@ static void inner_basic_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *ra
177
181
/* Non blocking implementation */
178
182
179
183
typedef struct {
180
- volatile BLASLONG working [MAX_CPU_NUMBER ][CACHE_LINE_SIZE * DIVIDE_RATE ];
184
+ #if _STDC_VERSION__ >= 201112L
185
+ _Atomic
186
+ #else
187
+ volatile
188
+ #endif
189
+ BLASLONG working [MAX_CPU_NUMBER ][CACHE_LINE_SIZE * DIVIDE_RATE ];
181
190
} job_t ;
182
191
183
192
#define ICOPY_OPERATION (M , N , A , LDA , X , Y , BUFFER ) GEMM_ITCOPY(M, N, (FLOAT *)(A) + ((Y) + (X) * (LDA)) * COMPSIZE, LDA, BUFFER);
@@ -216,9 +225,11 @@ static int inner_advanced_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *
216
225
FLOAT * sbb = sb ;
217
226
218
227
blasint * ipiv = (blasint * )args -> c ;
219
-
228
+ #if _STDC_VERSION__ >= 201112L
229
+ _Atomic BLASLONG * flag = (_Atomic BLASLONG * )args -> d ;
230
+ #else
220
231
volatile BLASLONG * flag = (volatile BLASLONG * )args -> d ;
221
-
232
+ #endif
222
233
if (args -> a == NULL ) {
223
234
TRSM_ILTCOPY (k , k , (FLOAT * )args -> b , lda , 0 , sb );
224
235
sbb = (FLOAT * )((((BLASULONG )(sb + k * k * COMPSIZE ) + GEMM_ALIGN ) & ~GEMM_ALIGN ) + GEMM_OFFSET_B );
@@ -378,7 +389,12 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa,
378
389
#ifdef _MSC_VER
379
390
BLASLONG flag [MAX_CPU_NUMBER * CACHE_LINE_SIZE ];
380
391
#else
381
- volatile BLASLONG flag [MAX_CPU_NUMBER * CACHE_LINE_SIZE ] __attribute__((aligned (128 )));
392
+ #if _STDC_VERSION__ >= 201112L
393
+ _Atomic
394
+ #else
395
+ volatile
396
+ #endif
397
+ BLASLONG flag [MAX_CPU_NUMBER * CACHE_LINE_SIZE ] __attribute__((aligned (128 )));
382
398
#endif
383
399
384
400
#ifndef COMPLEX
@@ -634,8 +650,12 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa,
634
650
BLASLONG range [MAX_CPU_NUMBER + 1 ];
635
651
636
652
BLASLONG width , nn , num_cpu ;
637
-
638
- volatile BLASLONG flag [MAX_CPU_NUMBER * CACHE_LINE_SIZE ] __attribute__((aligned (128 )));
653
+ #if _STDC_VERSION__ >= 201112L
654
+ _Atomic
655
+ #else
656
+ volatile
657
+ #endif
658
+ BLASLONG flag [MAX_CPU_NUMBER * CACHE_LINE_SIZE ] __attribute__((aligned (128 )));
639
659
640
660
#ifndef COMPLEX
641
661
#ifdef XDOUBLE
0 commit comments