[Openmp-commits] [openmp] [OpenMP] Align up the size when calling aligned_alloc (PR #65525)
Shilei Tian via Openmp-commits
openmp-commits at lists.llvm.org
Wed Sep 6 13:14:30 PDT 2023
================
@@ -21,7 +21,10 @@
#define KMP_ALIGNED_ALLOCATE(size, alignment) _mm_malloc(size, alignment)
#define KMP_ALIGNED_FREE(ptr) _mm_free(ptr)
#elif KMP_HAVE_ALIGNED_ALLOC
-#define KMP_ALIGNED_ALLOCATE(size, alignment) aligned_alloc(alignment, size)
+#define KMP_ALGIN_UP(val, alignment) \
+ (((val) + (alignment)-1) / (alignment) * (alignment))
----------------
shiltian wrote:
Hmm, that must be a bug in `clang-format`. I did add spaces before and after `-` and `1`.
https://github.com/llvm/llvm-project/pull/65525
More information about the Openmp-commits
mailing list