You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the simde_mm512_mask_loadu_* the issue isn't as severe since they do correctly keep the old values in the target register, however they still load all values from the source into a temporary register which could cause segmentation faults. Take for example the following code:
#include <iostream>
#include "simde/x86/avx512.h"
int main() {
simde__m512d a = simde_mm512_setzero_pd();
simde_mm512_mask_loadu_pd(a, 0, nullptr);
for (int i = 0; i < 8; ++i) {
std::cout << a[i] << " ";
}
std::cout << std::endl;
return 0;
}
@Jakob-en Thank you for your report, this makes sense and I see how we missed this in testing (we initialized to all zeros and also some functions aren't tested).
The masked functions should not touch memory where the mask is set to 0 at all.
Instead, the simde_mm512_mask_storeu_* functions write a 0 if the mask is set to 0. Take for example the following code:
Using SIMDe:
Using native AVX512
For the simde_mm512_mask_loadu_* the issue isn't as severe since they do correctly keep the old values in the target register, however they still load all values from the source into a temporary register which could cause segmentation faults. Take for example the following code:
Using SIMDe:
Using native AVX512:
The text was updated successfully, but these errors were encountered: