Typo in AVX512 Intrinsic

Issue #279 resolved
Tim Zimmermann created an issue

Consider the following code snippet:

#include <blaze/math/DynamicVector.h>;

int main() {
    blaze::DynamicVector<double>; c(100);
    return 0;
}

Compiling with gcc 8.2.0 on a AVX512 capable CPU (Xeon Gold 6130),

g++ -mavx512f -o test test.cc

yields the following error:

PATH/TO/BLAZE/blaze/math/simd/Set.h:103:12: error: there are no arguments to ‘_m512_set1_epi16’ that depend on a template parameter, so a declaration of ‘_m512_set1_epi16’ must be available [-fpermissive]
     return _m512_set1_epi16(reinterpret_cast<const int16_t>(value));

According to Intel’s documentation for vector intrinsics, the code line in question (see error) should be changed to:

#if BLAZE_AVX512F_MODE
  return _mm512_set1_epi16( reinterpret_cast<const int16_t>( value ) );

Best,

Tim

Comments (7)

  1. Klaus Iglberger

    Hi Tim!

    Thanks a lot for raising this issue. You are correct, line 103 in PATH/TO/BLAZE/blaze/math/simd/Set.h contains two typos. By coincident we have found this issue on our own today and have already fixed it. We will immediately push it after the necessary verifications. Thanks again,

    Best regards,

    Klaus!

  2. Klaus Iglberger

    Hi Tim!

    Commit 91dfd74 fixes the errors in the SIMD ‘set()’ function. I personally apologize for the inconvenience. Thanks again for reporting this defect,

    Best regards,

    Klaus!

  3. Klaus Iglberger

    Commit 91dfd74 fixes the typos in the SIMD set() function for 8-bit integral types. The fix is immediately available via cloning the Blaze repository and will be officially released in Blaze 3.6.

  4. Log in to comment