File tree Expand file tree Collapse file tree 5 files changed +13
-12
lines changed
inst/include/legacy/armadillo_bits Expand file tree Collapse file tree 5 files changed +13
-12
lines changed Original file line number Diff line number Diff line change 13
13
GTAGS
14
14
inst /include /armadillo_bits /config.hpp.cmake
15
15
inst /include /current /armadillo_bits /config.hpp.cmake
16
+ inst /include /legacy /armadillo_bits /config.hpp.cmake
Original file line number Diff line number Diff line change @@ -615,7 +615,7 @@ Cube<eT>::get_mat_ptr(const uword in_slice) const
615
615
616
616
#if defined(ARMA_USE_OPENMP)
617
617
{
618
- #pragma omp atomic read
618
+ #pragma omp atomic read seq_cst
619
619
mat_ptr = mat_ptrs[in_slice];
620
620
}
621
621
#elif defined(ARMA_USE_STD_MUTEX)
@@ -634,12 +634,12 @@ Cube<eT>::get_mat_ptr(const uword in_slice) const
634
634
{
635
635
#pragma omp critical (arma_Cube_mat_ptrs)
636
636
{
637
- #pragma omp atomic read
637
+ #pragma omp atomic read seq_cst
638
638
mat_ptr = mat_ptrs[in_slice];
639
639
640
640
if (mat_ptr == nullptr ) { mat_ptr = create_mat_ptr (in_slice); }
641
641
642
- #pragma omp atomic write
642
+ #pragma omp atomic write seq_cst
643
643
mat_ptrs[in_slice] = mat_ptr;
644
644
}
645
645
}
Original file line number Diff line number Diff line change @@ -312,7 +312,7 @@ struct state_type
312
312
int out;
313
313
314
314
#if defined(ARMA_USE_OPENMP)
315
- #pragma omp atomic read
315
+ #pragma omp atomic read seq_cst
316
316
out = state;
317
317
#elif defined(ARMA_USE_STD_MUTEX)
318
318
out = state.load ();
@@ -328,7 +328,7 @@ struct state_type
328
328
operator = (const int in_state)
329
329
{
330
330
#if defined(ARMA_USE_OPENMP)
331
- #pragma omp atomic write
331
+ #pragma omp atomic write seq_cst
332
332
state = in_state;
333
333
#elif defined(ARMA_USE_STD_MUTEX)
334
334
state.store (in_state);
Original file line number Diff line number Diff line change 23
23
24
24
#define ARMA_VERSION_MAJOR 14
25
25
#define ARMA_VERSION_MINOR 6
26
- #define ARMA_VERSION_PATCH 2
26
+ #define ARMA_VERSION_PATCH 3
27
27
#define ARMA_VERSION_NAME " Caffe Mocha"
28
28
29
29
Original file line number Diff line number Diff line change 394
394
395
395
396
396
#if !defined(ARMA_DONT_USE_OPENMP)
397
- #if (defined(_OPENMP) && (_OPENMP >= 201107 ))
397
+ #if (defined(_OPENMP) && (_OPENMP >= 201307 ))
398
398
#undef ARMA_USE_OPENMP
399
399
#define ARMA_USE_OPENMP
400
400
#endif
401
401
#endif
402
402
403
403
404
- #if ( defined(ARMA_USE_OPENMP) && (!defined(_OPENMP) || (defined(_OPENMP) && (_OPENMP < 201107 ))) )
404
+ #if ( defined(ARMA_USE_OPENMP) && (!defined(_OPENMP) || (defined(_OPENMP) && (_OPENMP < 201307 ))) )
405
405
// OpenMP 3.0 required for parallelisation of loops with unsigned integers
406
- // OpenMP 3.1 required for atomic read and atomic write
406
+ // OpenMP 3.1 required for atomic read/write
407
+ // OpenMP 4.0 required for seq_cst memory order clause in atomic read/write
407
408
#undef ARMA_USE_OPENMP
408
409
#undef ARMA_PRINT_OPENMP_WARNING
409
410
#define ARMA_PRINT_OPENMP_WARNING
410
411
#endif
411
412
412
413
413
414
#if defined(ARMA_PRINT_OPENMP_WARNING) && !defined(ARMA_DONT_PRINT_OPENMP_WARNING)
414
- #pragma message ("WARNING: use of OpenMP disabled; compiler support for OpenMP 3.1 + not detected")
415
+ #pragma message ("WARNING: use of OpenMP disabled; compiler support for OpenMP 4.0 + not detected")
415
416
416
- #if (defined(_OPENMP) && (_OPENMP < 201107 ))
417
+ #if (defined(_OPENMP) && (_OPENMP < 201307 ))
417
418
#pragma message ("NOTE: your compiler has an outdated version of OpenMP")
418
- #pragma message ("NOTE: consider upgrading to a better compiler")
419
419
#endif
420
420
#endif
421
421
You can’t perform that action at this time.
0 commit comments