Largest data type which can be fetch-ANDed atomically?
问题 I wanted to try and atomically reset 256 bits using something like this: #include <x86intrin.h> #include <iostream> #include <array> #include <atomic> int main(){ std::array<std::atomic<__m256i>, 10> updateArray; __m256i allZeros = _mm256_setzero_si256(); updateArray[0].fetch_and(allZeros); } but I get compiler errors about the element not having fetch_and() . Is this not possible because 256 bit type is too large to guarantee atomicity? Is there any other way I can implement this? I am using