Skip to content

SYCL Fix, master branch (2020.01.11.)

Taught CxxUtils about the SYCL_LANGUAGE_VERSION macro, as the Intel compiler is no longer using the macro name CL_SYCL_LANGUAGE_VERSION, but rather SYCL_LANGUAGE_VERSION.

At the same time still kept the CL_SYCL_LANGUAGE_VERSION check around as well, in case we would try to build the code with an older version of the Intel compiler.

A note to @ssnyder: While building CxxUtils using the 2020-11 tag of https://github.com/intel/llvm, I ran into the following compilation warning:

In file included from /data/projects/athena-gpu/athena/Control/CxxUtils/test/vec_float_test.cxx:12:
/data/projects/athena-gpu/athena/Control/CxxUtils/test/vec_test_common.h:417:29: warning: variable 'v' is uninitialized when passed as a const reference argument here [-Wuninitialized-const-reference]
  assert(CxxUtils::vec_size(v) == 4);
                            ^
/usr/include/assert.h:87:5: note: expanded from macro 'assert'
  ((expr)                                                               \
    ^~~~
/data/projects/athena-gpu/athena/Control/CxxUtils/test/vec_float_test.cxx:19:3: note: in instantiation of function template specialization 'testFloat1<CxxUtils::vec>' requested here
  testFloat1<CxxUtils::vec>();
  ^
[ 84%] Built target CxxUtils_procmaps_test
[ 84%] Built target CxxUtils_bitscan_test_portable
[ 84%] Built target CxxUtils_bitscan_test
[ 84%] Built target CxxUtils_CachedUniquePtr_test
[ 84%] Built target CxxUtils_crc64_test
[ 84%] Built target CxxUtils_BitPackerUnpacker_test
In file included from /data/projects/athena-gpu/athena/Control/CxxUtils/test/vec_int_test.cxx:12:
/data/projects/athena-gpu/athena/Control/CxxUtils/test/vec_test_common.h:460:29: warning: variable 'v' is uninitialized when passed as a const reference argument here [-Wuninitialized-const-reference]
  assert(CxxUtils::vec_size(v) == 4);
                            ^
/usr/include/assert.h:87:5: note: expanded from macro 'assert'
  ((expr)                                                               \
    ^~~~
/data/projects/athena-gpu/athena/Control/CxxUtils/test/vec_int_test.cxx:19:3: note: in instantiation of function template specialization 'testInt1<CxxUtils::vec>' requested here
  testInt1<CxxUtils::vec>();
  ^

I looked at your code a little. It seems to "do the right thing", but I think we can expect that Clang will start complaining about this in the future. However since I was not sure off the bat how we should tell the compiler that the function argument's value is not really used by the function (only its type), I decided not to touch that in this MR.

Merge request reports