-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/simd load #1018
Feature/simd load #1018
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1018 +/- ##
==========================================
+ Coverage 96.42% 96.42% +<.01%
==========================================
Files 185 185
Lines 6714 6717 +3
==========================================
+ Hits 6474 6477 +3
Misses 240 240
Continue to review full report at Codecov.
|
@marehr can u review this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇
else if constexpr (simd_traits<simd_t>::max_length == 1) // scalar value? | ||
return simd_t{*reinterpret_cast<simd_t const *>(mem_addr)}; | ||
else | ||
static_assert(simd_traits<simd_t>::max_length >= 1 && simd_traits<simd_t>::max_length, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simd_traits<simd_t>::max_length
is weird.
using simd_type = simd_type_t<int16_t>; | ||
|
||
std::array<int16_t, simd_traits<simd_type>::length> mem{}; | ||
simd_type expect{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simd_type expect{}; | |
simd_type expect = iota<simd_type>(0); |
for (int16_t i = 0; i < static_cast<int16_t>(mem.size()); ++i) | ||
{ | ||
mem[i] = i; | ||
expect[i] = i; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expect[i] = i; |
superseded by #1190 |
Adds load function for simd.
Tested with sse4, avx2 and avx512.