if(NOT GMX_OPENMP)
GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "-Wno-unknown-pragmas" GMXC_CXXFLAGS)
endif()
+ GMX_TEST_CXXFLAG(CXXFLAGS_WARN_NO_RESERVED_IDENTIFIER "-Wno-reserved-identifier" GMXC_CXXFLAGS) # LLVM BUG #50644
GMX_TEST_CXXFLAG(CXXFLAGS_WARN_NO_MISSING_FIELD_INITIALIZERS "-Wno-missing-field-initializers" GMXC_CXXFLAGS)
# Intel LLVM 2021.2 defaults to no-finite-math which isn't OK for GROMACS
if(GMX_INTEL_LLVM AND GMX_INTEL_LLVM_VERSION GREATER_EQUAL 2021020)
GMX_TEST_CXXFLAG(CXXFLAGS_FINITE_MATH "-fno-finite-math-only" GMXC_CXXFLAGS)
endif()
- # Some versions of Intel ICPX compiler (at least 2021.1.1 to 2021.2.0) fail to unroll a loop
+ # Some versions of Intel ICPX compiler (at least 2021.1.1 to 2021.3.0) fail to unroll a loop
# in sycl::accessor::__init, and emit -Wpass-failed=transform-warning. This is a useful
# warning, but mostly noise right now. Probably related to using shared memory accessors.
# Note: not a typo: ICPX 2021.1.1 has GMX_INTEL_LLVM_VERSION 202110; 2021.2.0 has 20210200.
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2009,2010,2011,2012,2014 by the GROMACS development team.
- * Copyright (c) 2015,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2015,2018,2019,2020,2021, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#include "config.h"
+#include <cstdint>
#include <cstring>
+#include <type_traits>
#if GMX_INTEGER_BIG_ENDIAN
# define ARCH_IS_BIG_ENDIAN 1
* On little-endian machines, we can process properly aligned
* data without copying it.
*/
- if (!((data - reinterpret_cast<const md5_byte_t*>(0)) & 3))
+ if ((reinterpret_cast<std::uintptr_t>(data) % std::alignment_of_v<md5_word_t>) == 0)
{
/* data are properly aligned */
X = reinterpret_cast<const md5_word_t*>(data);
#endif
/* Exposing Intel-specific extensions in a manner compatible with SYCL2020 provisional spec.
- * Despite ICPX (up to 2021.1.2 at the least) having SYCL_LANGUAGE_VERSION=202001,
- * some parts of the spec are still in custom sycl::ONEAPI namespace (sycl::intel in beta versions),
+ * Despite ICPX (up to 2021.3.0 at the least) having SYCL_LANGUAGE_VERSION=202001,
+ * some parts of the spec are still in custom sycl::ONEAPI namespace (sycl::ext::oneapi in beta versions),
* and some functions have different names. To make things easier to upgrade
* in the future, this thin layer is added.
* */
namespace detail
{
#if GMX_SYCL_DPCPP
-// Confirmed to work for 2021.1-beta10 (20201005), 2021.1.1 (20201113), 2021.1.2 (20201214).
+// Confirmed to work for 2021.1-beta10 (20201005) to 2021.3.0 (20210619).
+// Deprecated in favor of sycl::ext::oneapi on 20210717 in https://github.com/intel/llvm/commit/d703f578.
namespace origin = cl::sycl::ONEAPI;
#elif GMX_SYCL_HIPSYCL
namespace origin = cl::sycl;