#ifndef KMP_BARRIER_H
#define KMP_BARRIER_H
#include "kmp.h"
#include "kmp_i18n.h"
#if KMP_HAVE_XMMINTRIN_H && KMP_HAVE__MM_MALLOC
#include <xmmintrin.h>
#define KMP_ALIGNED_ALLOCATE(size, alignment) …
#define KMP_ALIGNED_FREE(ptr) …
#elif KMP_HAVE_ALIGNED_ALLOC
#define KMP_ALGIN_UP …
#define KMP_ALIGNED_ALLOCATE …
#define KMP_ALIGNED_FREE …
#elif KMP_HAVE_POSIX_MEMALIGN
static inline void *KMP_ALIGNED_ALLOCATE(size_t size, size_t alignment) {
void *ptr;
int n = posix_memalign(&ptr, alignment, size);
if (n != 0) {
if (ptr)
free(ptr);
return nullptr;
}
return ptr;
}
#define KMP_ALIGNED_FREE …
#elif KMP_HAVE__ALIGNED_MALLOC
#include <malloc.h>
#define KMP_ALIGNED_ALLOCATE …
#define KMP_ALIGNED_FREE …
#else
#define KMP_ALIGNED_ALLOCATE …
#define KMP_ALIGNED_FREE …
#endif
#ifndef KMP_FOURLINE_ALIGN_CACHE
#define KMP_FOURLINE_ALIGN_CACHE …
#endif
#define KMP_OPTIMIZE_FOR_REDUCTIONS …
class distributedBarrier { … };
#endif