Removed the stupid constexpr

This commit is contained in:
Paul Ferrand 2019-12-23 21:45:17 +01:00
parent 63cdf10a9a
commit f7e454dad8

View file

@ -45,23 +45,23 @@ struct AlignmentSentinels {
float* lastAligned; float* lastAligned;
}; };
constexpr float* nextAligned(const float* ptr) float* nextAligned(const float* ptr)
{ {
return reinterpret_cast<float*>((reinterpret_cast<uintptr_t>(ptr) + ByteAlignmentMask) & (~ByteAlignmentMask)); return reinterpret_cast<float*>((reinterpret_cast<uintptr_t>(ptr) + ByteAlignmentMask) & (~ByteAlignmentMask));
} }
constexpr float* prevAligned(const float* ptr) float* prevAligned(const float* ptr)
{ {
return reinterpret_cast<float*>(reinterpret_cast<uintptr_t>(ptr) & (~ByteAlignmentMask)); return reinterpret_cast<float*>(reinterpret_cast<uintptr_t>(ptr) & (~ByteAlignmentMask));
} }
constexpr bool unaligned(const float* ptr) bool unaligned(const float* ptr)
{ {
return (reinterpret_cast<uintptr_t>(ptr) & ByteAlignmentMask) != 0; return (reinterpret_cast<uintptr_t>(ptr) & ByteAlignmentMask) != 0;
} }
template<class... Args> template<class... Args>
constexpr bool unaligned(const float* ptr1, Args... rest) bool unaligned(const float* ptr1, Args... rest)
{ {
return unaligned(ptr1) || unaligned(rest...); return unaligned(ptr1) || unaligned(rest...);
} }