remove AlignedAlloc, use alignas

This commit is contained in:
Matthias Hochsteger 2020-12-15 09:40:22 +01:00
parent 1f3aebcec0
commit 1b55c51da5
4 changed files with 6 additions and 9 deletions

View File

@ -61,7 +61,7 @@ namespace ngcore
}
template<>
class SIMD<int64_t,4>
class alignas(32) SIMD<int64_t,4>
{
__m256i data;
@ -99,7 +99,7 @@ namespace ngcore
#endif // __AVX2__
template<>
class SIMD<double,4>
class alignas(32) SIMD<double,4>
{
__m256d data;

View File

@ -39,7 +39,7 @@ namespace ngcore
};
template<>
class SIMD<int64_t,8>
class alignas(64) SIMD<int64_t,8>
{
__m512i data;
@ -76,7 +76,7 @@ namespace ngcore
template<>
class SIMD<double,8> : public AlignedAlloc<SIMD<double,8>>
class alignas(64) SIMD<double,8>
{
__m512d data;
public:

View File

@ -624,9 +624,6 @@ namespace ngcore
return ngcore::SIMD<double,N>([a](int i)->double { return cosh(a[i]); } );
}
template <typename T>
class AlignedAlloc { ; };
template<int N, typename T>
using MultiSIMD = SIMD<T, N*GetDefaultSIMDSize()>;

View File

@ -39,7 +39,7 @@ namespace ngcore
template<>
class SIMD<int64_t,2>
class alignas(16) SIMD<int64_t,2>
{
__m128i data;
@ -77,7 +77,7 @@ NETGEN_INLINE SIMD<int64_t,2> operator- (SIMD<int64_t,2> a, SIMD<int64_t,2> b) {
template<>
class alignas(16) SIMD<double,2> : public AlignedAlloc<SIMD<double,2>>
class alignas(16) SIMD<double,2>
{
__m128d data;