Use _Atomic instead of volatile where available (file moved from ../getrf)
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Sat, 25 Jul 2020 06:52:24 +0000 (08:52 +0200)
committerGitHub <noreply@github.com>
Sat, 25 Jul 2020 06:52:24 +0000 (08:52 +0200)
must have misplaced this in ../getrf when I made that change in March 2018 (40160ff)
the only changes since then were
RFC : Add half precision gemm for bfloat16 in OpenBLAS Rajalakshmi Srinivasaraghavan
Rajalakshmi Srinivasaraghavan committed on 14 Apr 2020 as 7ebbb50

    Change _STDC_VERSION__ to __STDC_VERSION__
Zhiyong Dang committed on 11 May 2018 as 3716267

lapack/potrf/potrf_parallel.c

index e61e8de..008fcb8 100644 (file)
@@ -101,7 +101,12 @@ static FLOAT dm1 = -1.;
 #endif
 
 typedef struct {
-  volatile BLASLONG working[MAX_CPU_NUMBER][CACHE_LINE_SIZE * DIVIDE_RATE];
+#ifdef HAVE_C11
+  _Atomic 
+#else
+  volatile 
+#endif
+  BLASLONG working[MAX_CPU_NUMBER][CACHE_LINE_SIZE * DIVIDE_RATE];
 } job_t;
 
 
@@ -375,6 +380,9 @@ static int thread_driver(blas_arg_t *args, FLOAT *sa, FLOAT *sb){
 #elif defined(DOUBLE)
   mode  =  BLAS_DOUBLE  | BLAS_REAL;
   mask  = MAX(DGEMM_UNROLL_M, DGEMM_UNROLL_N) - 1;
+#elif defined(HALF)
+  mode  =  BLAS_HALF  | BLAS_REAL;
+  mask  = MAX(SHGEMM_UNROLL_M, SHGEMM_UNROLL_N) - 1;
 #else
   mode  =  BLAS_SINGLE  | BLAS_REAL;
   mask  = MAX(SGEMM_UNROLL_M, SGEMM_UNROLL_N) - 1;