Commit dd08591f authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Force the vectorization of the M2P and cache population loops

parent 057f7b65
......@@ -53,6 +53,7 @@ AM_CONFIG_HEADER(config.h)
AX_CHECK_ENABLE_DEBUG
AC_PROG_CC
AM_PROG_CC_C_O
AC_OPENMP
# If debug is selected then we also define SWIFT_DEVELOP_MODE to control
# any developer code options.
......
......@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Add the source directory and the non-standard paths to the included library headers to CFLAGS
AM_CFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/examples $(HDF5_CPPFLAGS) $(GSL_INCS) $(FFTW_INCS) $(NUMA_INCS)
AM_CFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/examples $(HDF5_CPPFLAGS) $(GSL_INCS) $(FFTW_INCS) $(NUMA_INCS) $(OPENMP_CFLAGS)
AM_LDFLAGS = $(HDF5_LDFLAGS) $(HDF5_LIBS) $(FFTW_LIBS) $(NUMA_LIBS) $(TCMALLOC_LIBS) $(JEMALLOC_LIBS) $(TBBMALLOC_LIBS) $(GRACKLE_LIBS) $(GSL_LIBS) $(PROFILER_LIBS)
......
......@@ -20,7 +20,7 @@ MYFLAGS =
# Add the source directory and the non-standard paths to the included library headers to CFLAGS
AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/argparse $(HDF5_CPPFLAGS) \
$(GSL_INCS) $(FFTW_INCS) $(NUMA_INCS) $(GRACKLE_INCS)
$(GSL_INCS) $(FFTW_INCS) $(NUMA_INCS) $(GRACKLE_INCS) $(OPENMP_CFLAGS)
AM_LDFLAGS = $(HDF5_LDFLAGS)
......
......@@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Add the non-standard paths to the included library headers
AM_CFLAGS = $(HDF5_CPPFLAGS) $(GSL_INCS) $(FFTW_INCS) $(NUMA_INCS) $(GRACKLE_INCS)
AM_CFLAGS = $(HDF5_CPPFLAGS) $(GSL_INCS) $(FFTW_INCS) $(NUMA_INCS) $(GRACKLE_INCS) $(OPENMP_CFLAGS)
# Assign a "safe" version number
AM_LDFLAGS = $(HDF5_LDFLAGS) $(FFTW_LIBS)
......
......@@ -225,6 +225,9 @@ INLINE static void gravity_cache_populate(
swift_assume_size(gcount_padded, VEC_SIZE);
/* Fill the input caches */
#ifndef SWIFT_DEBUG_CHECKS
#pragma omp simd
#endif
for (int i = 0; i < gcount; ++i) {
x[i] = (float)(gparts[i].x[0] - shift[0]);
......
......@@ -699,6 +699,9 @@ static INLINE void runner_dopair_grav_pm_full(
swift_assume_size(gcount_padded_i, VEC_SIZE);
/* Loop over all particles in ci... */
#ifndef SWIFT_DEBUG_CHECKS
#pragma omp simd
#endif
for (int pid = 0; pid < gcount_padded_i; pid++) {
/* Skip inactive particles */
......@@ -837,6 +840,9 @@ static INLINE void runner_dopair_grav_pm_truncated(
swift_assume_size(gcount_padded_i, VEC_SIZE);
/* Loop over all particles in ci... */
#ifndef SWIFT_DEBUG_CHECKS
#pragma omp simd
#endif
for (int pid = 0; pid < gcount_padded_i; pid++) {
/* Skip inactive particles */
......
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