@@ -119,7 +119,11 @@ static void inner_basic_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *ra
119
119
FLOAT * d = (FLOAT * )args -> b + (k + k * lda ) * COMPSIZE ;
120
120
FLOAT * sbb = sb ;
121
121
122
+ #if _STDC_VERSION__ >= 201112L
123
+ _Atomic BLASLONG * flag = (_Atomic BLASLONG * )args -> d ;
124
+ #else
122
125
volatile BLASLONG * flag = (volatile BLASLONG * )args -> d ;
126
+ #endif
123
127
124
128
blasint * ipiv = (blasint * )args -> c ;
125
129
@@ -197,7 +201,12 @@ static void inner_basic_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *ra
197
201
/* Non blocking implementation */
198
202
199
203
typedef struct {
200
- volatile BLASLONG working [MAX_CPU_NUMBER ][CACHE_LINE_SIZE * DIVIDE_RATE ];
204
+ #if _STDC_VERSION__ >= 201112L
205
+ _Atomic
206
+ #else
207
+ volatile
208
+ #endif
209
+ BLASLONG working [MAX_CPU_NUMBER ][CACHE_LINE_SIZE * DIVIDE_RATE ];
201
210
} job_t ;
202
211
203
212
#define ICOPY_OPERATION (M , N , A , LDA , X , Y , BUFFER ) GEMM_ITCOPY(M, N, (FLOAT *)(A) + ((Y) + (X) * (LDA)) * COMPSIZE, LDA, BUFFER);
@@ -236,11 +245,12 @@ static int inner_advanced_thread(blas_arg_t *args, BLASLONG *range_m, BLASLONG *
236
245
FLOAT * sbb = sb ;
237
246
238
247
blasint * ipiv = (blasint * )args -> c ;
239
-
240
- BLASLONG jw ;
241
-
248
+ BLASLONG jw ;
249
+ #if _STDC_VERSION__ >= 201112L
250
+ _Atomic BLASLONG * flag = (_Atomic BLASLONG * )args -> d ;
251
+ #else
242
252
volatile BLASLONG * flag = (volatile BLASLONG * )args -> d ;
243
-
253
+ #endif
244
254
if (args -> a == NULL ) {
245
255
TRSM_ILTCOPY (k , k , (FLOAT * )args -> b , lda , 0 , sb );
246
256
sbb = (FLOAT * )((((BLASULONG )(sb + k * k * COMPSIZE ) + GEMM_ALIGN ) & ~GEMM_ALIGN ) + GEMM_OFFSET_B );
@@ -442,7 +452,12 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa,
442
452
#ifdef _MSC_VER
443
453
BLASLONG flag [MAX_CPU_NUMBER * CACHE_LINE_SIZE ];
444
454
#else
445
- volatile BLASLONG flag [MAX_CPU_NUMBER * CACHE_LINE_SIZE ] __attribute__((aligned (128 )));
455
+ #if _STDC_VERSION__ >= 201112L
456
+ _Atomic
457
+ #else
458
+ volatile
459
+ #endif
460
+ BLASLONG flag [MAX_CPU_NUMBER * CACHE_LINE_SIZE ] __attribute__((aligned (128 )));
446
461
#endif
447
462
448
463
#ifndef COMPLEX
@@ -713,8 +728,12 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa,
713
728
BLASLONG range [MAX_CPU_NUMBER + 1 ];
714
729
715
730
BLASLONG width , nn , num_cpu ;
716
-
717
- volatile BLASLONG flag [MAX_CPU_NUMBER * CACHE_LINE_SIZE ] __attribute__((aligned (128 )));
731
+ #if _STDC_VERSION__ >= 201112L
732
+ _Atomic
733
+ #else
734
+ volatile
735
+ #endif
736
+ BLASLONG flag [MAX_CPU_NUMBER * CACHE_LINE_SIZE ] __attribute__((aligned (128 )));
718
737
719
738
#ifndef COMPLEX
720
739
#ifdef XDOUBLE
0 commit comments