Don't use __builtin_alloca_with_align with nvc++

This commit is contained in:
Morris Hafner 2024-10-30 18:02:08 +00:00 committed by Antonio Sánchez
parent 84c446df2c
commit c8267654f2

View File

@ -765,7 +765,7 @@ void swap(scoped_array<T>& a, scoped_array<T>& b) {
// We always manually re-align the result of EIGEN_ALLOCA. // We always manually re-align the result of EIGEN_ALLOCA.
// If alloca is already aligned, the compiler should be smart enough to optimize away the re-alignment. // If alloca is already aligned, the compiler should be smart enough to optimize away the re-alignment.
#if (EIGEN_COMP_GNUC || EIGEN_COMP_CLANG) #if ((EIGEN_COMP_GNUC || EIGEN_COMP_CLANG) && !EIGEN_COMP_NVHPC)
#define EIGEN_ALIGNED_ALLOCA(SIZE) __builtin_alloca_with_align(SIZE, CHAR_BIT* EIGEN_DEFAULT_ALIGN_BYTES) #define EIGEN_ALIGNED_ALLOCA(SIZE) __builtin_alloca_with_align(SIZE, CHAR_BIT* EIGEN_DEFAULT_ALIGN_BYTES)
#else #else
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void* eigen_aligned_alloca_helper(void* ptr) { EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void* eigen_aligned_alloca_helper(void* ptr) {