Skip to content

Commit df5d2ec

Browse files
committed
Fix compiling for AVX512
1 parent 9a2c20e commit df5d2ec

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

libsrc/core/simd_avx512.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ namespace ngcore
5959
data = _mm512_set_epi64(func(7), func(6), func(5), func(4), func(3), func(2), func(1), func(0));
6060
}
6161

62+
SIMD (SIMD<int64_t,4> v0, SIMD<int64_t,4> v1)
63+
: data(_mm512_castsi256_si512(v0.Data()))
64+
{
65+
data = _mm512_inserti64x4(data, v1.Data(), 1);
66+
}
67+
68+
SIMD<int64_t,4> Lo() const { return _mm512_castsi512_si256(data); }
69+
SIMD<int64_t,4> Hi() const { return _mm512_extracti64x4_epi64(data, 1); }
70+
6271

6372
NETGEN_INLINE auto operator[] (int i) const { return ((int64_t*)(&data))[i]; }
6473
NETGEN_INLINE auto & operator[] (int i) { return ((int64_t*)(&data))[i]; }

0 commit comments

Comments
 (0)