mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-10-19 11:31:07 +08:00
assume_aligned uses bytes not bits
This commit is contained in:
parent
ac7c192e1b
commit
cd4f989f8f
@ -1345,10 +1345,10 @@ EIGEN_DEVICE_FUNC void destroy_at(T* p) {
|
||||
#ifndef EIGEN_ASSUME_ALIGNED
|
||||
#if defined(__cpp_lib_assume_aligned) && (__cpp_lib_assume_aligned >= 201811L)
|
||||
#define EIGEN_ASSUME_ALIGNED(PTR, ALIGN_BYTES) \
|
||||
{ PTR = std::assume_aligned<8 * (ALIGN_BYTES)>(PTR); }
|
||||
{ PTR = std::assume_aligned<ALIGN_BYTES>(PTR); }
|
||||
#elif EIGEN_HAS_BUILTIN(__builtin_assume_aligned)
|
||||
#define EIGEN_ASSUME_ALIGNED(PTR, ALIGN_BYTES) \
|
||||
{ PTR = static_cast<decltype(PTR)>(__builtin_assume_aligned(PTR, (ALIGN_BYTES))); }
|
||||
{ PTR = static_cast<decltype(PTR)>(__builtin_assume_aligned(PTR, ALIGN_BYTES)); }
|
||||
#else
|
||||
#define EIGEN_ASSUME_ALIGNED(PTR, ALIGN_BYTES) /* do nothing */
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user