title: Largest data type which can be fetch-ANDed atomically?
body: <p>I wanted to try and atomically reset 256 bits using something like this:</p>
  
  <pre><code>#include &lt;x86intrin.h&gt;
  #include &lt;iostream&gt;
  #include &lt;array&gt;
  #include &lt;atomic&gt;
  
  int main(){
  
      std::array&lt;std::atomic&lt;__m256i&gt;, 10&gt; updateArray;
  
      __m256i allZeros = _mm256_setzero_si256();
  
      updateArray[0].fetch_and(allZeros);
  }
  </code></pre>
  
  <p>but I get compiler errors about the element not having <code>fetch_and()</code>. Is this not possible because 256 bit type is too large to guarantee atomicity? </p>
  
  <p>Is there any other way I can implement this? I am using GCC. </p>
  
  <p>If not, what is the largest type I can reset atomically- 64 bits?</p>
  
  <p>EDIT: Could any AVX instructions perform the fetch-AND atomically?</p>