Commit b91439d9 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Merge branch 'openmp-4.0' into 'master'

Use simd OpenMP pragma only when available

See merge request !1141
parents 149abf34 4115ed94
......@@ -225,7 +225,7 @@ INLINE static void gravity_cache_populate(
swift_assume_size(gcount_padded, VEC_SIZE);
/* Fill the input caches */
#ifndef SWIFT_DEBUG_CHECKS
#if !defined(SWIFT_DEBUG_CHECKS) && _OPENMP >= 201307
#pragma omp simd
#endif
for (int i = 0; i < gcount; ++i) {
......@@ -485,7 +485,7 @@ INLINE static void gravity_cache_write_back(const struct gravity_cache *c,
swift_declare_aligned_ptr(int, active, c->active, SWIFT_CACHE_ALIGNMENT);
/* Write stuff back to the particles */
#ifndef SWIFT_DEBUG_CHECKS
#if !defined(SWIFT_DEBUG_CHECKS) && _OPENMP >= 201307
#pragma omp simd
#endif
for (int i = 0; i < gcount; ++i) {
......
......@@ -882,7 +882,7 @@ static INLINE void runner_dopair_grav_pm_full(
const float multi_epsilon = multi_j->max_softening;
/* Loop over all particles in ci... */
#ifndef SWIFT_DEBUG_CHECKS
#if !defined(SWIFT_DEBUG_CHECKS) && _OPENMP >= 201307
#pragma omp simd
#endif
for (int pid = 0; pid < gcount_padded_i; pid++) {
......@@ -1025,7 +1025,7 @@ static INLINE void runner_dopair_grav_pm_truncated(
const float multi_epsilon = multi_j->max_softening;
/* Loop over all particles in ci... */
#ifndef SWIFT_DEBUG_CHECKS
#if !defined(SWIFT_DEBUG_CHECKS) && _OPENMP >= 201307
#pragma omp simd
#endif
for (int pid = 0; pid < gcount_padded_i; pid++) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment