Replies: 2 comments 4 replies
-
Hi @XCemaXX, are you trying to port the solution to AVX2, correct?
I always use the following printf-style debugging to dump the contents of a vector: auto printVector8 = [](auto vec, auto name) {
uint8_t debug[32];
_mm256_storeu_si256((__m256i*)debug, vec);
std::cout << name;
for (int i = 0; i < 32; i++)
std::cout << (int)debug[i] << " ";
std::cout << "\n";
};
auto printVector16 = [](auto vec, auto name) {
uint16_t debug[16];
_mm256_storeu_si256((__m256i*)debug, vec);
std::cout << name;
for (int i = 0; i < 16; i++)
std::cout << (int)debug[i] << " ";
std::cout << "\n";
};
// ... etc
printVector8(YMM1, "YMM1 :"); Hope that helps. |
Beta Was this translation helpful? Give feedback.
-
I'm implemented shift like this: LinuxIntelAlderlake WinZen3 LinuxWSL Skylake (myPC) |
Beta Was this translation helpful? Give feedback.
-
Hi. I'm asking for help with lab core_bound/compiler_intrinsics_1
For 256bit registers I tried load data as:
I think that it is OK. Check values in debugger.
With this changes validation is wrong for me. My error in shift function, because it is shifting by 128bit halfs instead off all 256 value?
Description of function differs from 128b version: 'Shifts each 128-bit half of the 256-bit integer vector a left by imm bytes, shifting in zero bytes, and returns the result. If imm is greater than 15, the returned result is all zeroes.'
I also tried 512b version with:
There is actually no such shift function.
Beta Was this translation helpful? Give feedback.
All reactions