Use #pragma omp simd for OpenMP 4.0 compilers (GH #787)

Crap... It is OpenMP 4.0, not 3.0
This commit is contained in:
Jeffrey Walton 2019-01-22 04:58:54 -05:00
parent 6ada677461
commit ef1b391ce6
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
3 changed files with 5 additions and 5 deletions

View File

@ -154,7 +154,7 @@ LDLIBS =
# Debug build.
# CXXFLAGS = $(CXXFLAGS) /DDEBUG /D_DEBUG /Oi /Oy- /Od /MTd
# Release build. Add /OPT:REF to linker
CXXFLAGS = $(CXXFLAGS) /DNDEBUG /D_NDEBUG /Oi /Oy /O2 /MT
CXXFLAGS = $(CXXFLAGS) /DNDEBUG /D_NDEBUG /Oi /Oy /O2 /MT /openmp
# Linker flags.
LDFLAGS = $(LDFLAGS) /OPT:REF

View File

@ -90,8 +90,8 @@ void Salsa20_Core(word32* data, unsigned int rounds)
x[15] ^= rotlConstant<18>(x[14]+x[13]);
}
// OpenMP 3.0 released May 2008.
#if _OPENMP >= 200805
// OpenMP 4.0 released July 2013.
#if _OPENMP >= 201307
#pragma omp simd
for (size_t i = 0; i < 16; ++i)
data[i] += x[i];

View File

@ -64,8 +64,8 @@ static inline void BlockCopy(byte* dest, byte* src, size_t len)
static inline void BlockXOR(byte* dest, byte* src, size_t len)
{
// OpenMP 3.0 released May 2008.
#if _OPENMP >= 200805
// OpenMP 4.0 released July 2013.
#if _OPENMP >= 201307
#pragma omp simd
for (size_t i = 0; i < len; ++i)
dest[i] ^= src[i];