Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
simde
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
simde
Commits
0adef454
Commit
0adef454
authored
Jun 16, 2023
by
Michael R. Crusoe
Committed by
Michael R. Crusoe
Oct 25, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avx512 gather: add MSVC native fallbacks
fix casts for GCC<9
parent
ecc46929
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
4 deletions
+43
-4
x86/avx2.h
x86/avx2.h
+2
-2
x86/avx512/gather.h
x86/avx512/gather.h
+41
-2
No files found.
x86/avx2.h
View file @
0adef454
...
...
@@ -2269,11 +2269,11 @@ simde_mm256_i32gather_ps(const simde_float32* base_addr, simde__m256i vindex, co
return
simde__m256_from_private
(
r_
);
}
#if defined(SIMDE_X86_AVX2_NATIVE)
#define simde_mm256_i32gather_ps(base_addr, vindex, scale) _mm256_i32gather_ps(SIMDE_CHECKED_REINTERPRET_CAST(float const*, simde_float32 const*,
base_addr), vindex, scale
)
#define simde_mm256_i32gather_ps(base_addr, vindex, scale) _mm256_i32gather_ps(SIMDE_CHECKED_REINTERPRET_CAST(float const*, simde_float32 const*,
(base_addr)), (vindex), (scale)
)
#endif
#if defined(SIMDE_X86_AVX2_ENABLE_NATIVE_ALIASES)
#undef _mm256_i32gather_ps
#define _mm256_i32gather_ps(base_addr, vindex, scale) simde_mm256_i32gather_ps(SIMDE_CHECKED_REINTERPRET_CAST(simde_float32 const*, float const*,
base_addr), vindex, scale
)
#define _mm256_i32gather_ps(base_addr, vindex, scale) simde_mm256_i32gather_ps(SIMDE_CHECKED_REINTERPRET_CAST(simde_float32 const*, float const*,
(base_addr)), (vindex), (scale)
)
#endif
SIMDE_FUNCTION_ATTRIBUTES
...
...
x86/avx512/gather.h
View file @
0adef454
...
...
@@ -66,6 +66,13 @@ simde_mm512_i32gather_ps(simde__m512i vindex, const void* base_addr, const int32
HEDLEY_STATIC_CAST(float const*, (base_addr)), simde_mm512_i32gather_ps_vindex_.m256i[1], (scale)); \
simde__m512_from_private(simde_mm512_i32gather_ps_r_); \
}))
#elif defined(SIMDE_X86_AVX2_NATIVE) && !defined(SIMDE_STATEMENT_EXPR_)
#define simde_mm512_i32gather_ps(vindex, base_addr, scale) \
simde_x_mm512_set_m256( \
_mm256_i32gather_ps(HEDLEY_STATIC_CAST(float const*, (base_addr)), \
simde_mm512_extracti32x8_epi32((vindex), 1), (scale)), \
_mm256_i32gather_ps(HEDLEY_STATIC_CAST(float const*, (base_addr)), \
simde_mm512_extracti32x8_epi32((vindex), 0), (scale)) )
#endif
#if defined(SIMDE_X86_AVX512F_ENABLE_NATIVE_ALIASES)
#undef _mm512_i32gather_ps
...
...
@@ -105,6 +112,15 @@ simde_mm512_i64gather_epi32(simde__m512i vindex, const void* base_addr, const in
HEDLEY_STATIC_CAST(int const*, (base_addr)), simde_mm512_i64gather_epi32_vindex_.m256i[1], (scale)); \
simde__m256i_from_private(simde_mm512_i64gather_epi32_r_); \
}))
#elif defined(SIMDE_X86_AVX2_NATIVE) && !defined(SIMDE_STATEMENT_EXPR_)
#define simde_mm512_i64gather_epi32(vindex, base_addr, scale) \
_mm256_insertf128_si256( \
_mm256_castsi128_si256( \
_mm256_i64gather_epi32(HEDLEY_STATIC_CAST(int const*, (base_addr)), \
simde_mm512_extracti64x4_epi64((vindex), 0), (scale))), \
_mm256_i64gather_epi32(HEDLEY_STATIC_CAST(int const*, (base_addr)), \
simde_mm512_extracti64x4_epi64((vindex), 1), (scale)), \
1)
#endif
#if defined(SIMDE_X86_AVX512F_ENABLE_NATIVE_ALIASES)
#undef _mm512_i64gather_epi32
...
...
@@ -148,11 +164,18 @@ simde_mm512_i64gather_epi64(simde__m512i vindex, const void* base_addr, const in
simde__m512i_private simde_mm512_i64gather_epi64_r_, \
simde_mm512_i64gather_epi64_vindex_ = simde__m512i_to_private((vindex)); \
simde_mm512_i64gather_epi64_r_.m256i[0] = _mm256_i64gather_epi64( \
HEDLEY_STATIC_CAST(
int64_t
const*, (base_addr)), simde_mm512_i64gather_epi64_vindex_.m256i[0], (scale)); \
HEDLEY_STATIC_CAST(
long long
const*, (base_addr)), simde_mm512_i64gather_epi64_vindex_.m256i[0], (scale)); \
simde_mm512_i64gather_epi64_r_.m256i[1] = _mm256_i64gather_epi64( \
HEDLEY_STATIC_CAST(
int64_t
const*, (base_addr)), simde_mm512_i64gather_epi64_vindex_.m256i[1], (scale)); \
HEDLEY_STATIC_CAST(
long long
const*, (base_addr)), simde_mm512_i64gather_epi64_vindex_.m256i[1], (scale)); \
simde__m512i_from_private(simde_mm512_i64gather_epi64_r_); \
}))
#elif defined(SIMDE_X86_AVX2_NATIVE) && !defined(SIMDE_STATEMENT_EXPR_)
#define simde_mm512_i64gather_epi64(vindex, base_addr, scale) \
simde_x_mm512_set_m256i( \
_mm256_i64gather_epi64(HEDLEY_STATIC_CAST(long long const*, (base_addr)), \
simde_mm512_extracti32x8_epi32((vindex), 1), (scale)), \
_mm256_i64gather_epi64(HEDLEY_STATIC_CAST(long long const*, (base_addr)), \
simde_mm512_extracti32x8_epi32((vindex), 0), (scale)) )
#endif
#if defined(SIMDE_X86_AVX512F_ENABLE_NATIVE_ALIASES)
#undef _mm512_i64gather_epi64
...
...
@@ -202,6 +225,13 @@ simde_mm512_i64gather_pd(simde__m512i vindex, const void* base_addr, const int32
HEDLEY_STATIC_CAST(double const*, (base_addr)), simde_mm512_i64gather_pd_vindex_.m256i[1], (scale)); \
simde__m512d_from_private(simde_mm512_i64gather_pd_r_); \
}))
#elif defined(SIMDE_X86_AVX2_NATIVE) && !defined(SIMDE_STATEMENT_EXPR_)
#define simde_mm512_i64gather_pd(vindex, base_addr, scale) \
simde_x_mm512_set_m256d( \
_mm256_i64gather_pd(HEDLEY_STATIC_CAST(double const*, (base_addr)), \
simde_mm512_extracti64x4_epi64((vindex), 1), (scale)), \
_mm256_i64gather_pd(HEDLEY_STATIC_CAST(double const*, (base_addr)), \
simde_mm512_extracti64x4_epi64((vindex), 0), (scale)) )
#endif
#if defined(SIMDE_X86_AVX512F_ENABLE_NATIVE_ALIASES)
#undef _mm512_i64gather_pd
...
...
@@ -251,6 +281,15 @@ simde_mm512_i64gather_ps(simde__m512i vindex, const void* base_addr, const int32
HEDLEY_STATIC_CAST(float const*, (base_addr)), simde_mm512_i64gather_ps_vindex_.m256i[1], (scale)); \
simde__m256_from_private(simde_mm512_i64gather_ps_r_); \
}))
#elif defined(SIMDE_X86_AVX2_NATIVE) && !defined(SIMDE_STATEMENT_EXPR_)
#define simde_mm512_i64gather_ps(vindex, base_addr, scale) \
_mm256_insertf128_ps( \
_mm256_castps128_ps256( \
_mm256_i64gather_ps(HEDLEY_STATIC_CAST(float const*, (base_addr)), \
simde_mm512_extracti64x4_epi64((vindex), 0), (scale))), \
_mm256_i64gather_ps(HEDLEY_STATIC_CAST(float const*, (base_addr)), \
simde_mm512_extracti64x4_epi64((vindex), 1), (scale)), \
1)
#endif
#if defined(SIMDE_X86_AVX512F_ENABLE_NATIVE_ALIASES)
#undef _mm512_i64gather_ps
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment