Skip to content
Snippets Groups Projects
Commit 5c21a9dd authored by Christos Anastopoulos's avatar Christos Anastopoulos
Browse files

gcc seems to support __builtin_convertvector already in version 9. We should...

gcc seems to support __builtin_convertvector already in version 9. We should be compiling master with clang>=10 anyhow so no need to check for clang support for the ternary operator for vectorized types
parent 7c8878e8
9 merge requests!69091Fix correlated smearing bug in JER in JetUncertainties in 22.0,!58791DataQualityConfigurations: Modify L1Calo config for web display,!51674Fixing hotSpotInHIST for Run3 HIST,!50012RecExConfig: Adjust log message levels from GetRunNumber and GetLBNumber,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!46538Draft: Added missing xAOD::TrigConfKeys from DESDM_MCP,!46514TGC Digitization: Implementation of signal propagation time between the sensor edge and ASD,!46268gcc seems to support __builtin_convertvector already in version 9. We should be compiling master with clang>=10 anyhow so no need to check for clang support for the ternary operator for vectorized types
......@@ -67,19 +67,10 @@
# define HAVE_VECTOR_SIZE_ATTRIBUTE 0
#endif
// Do we additionally support the ternary operator for vectorizes types.
// GCC and llvm clang >=10
#if HAVE_VECTOR_SIZE_ATTRIBUTE && \
!(defined(__clang__) && ((__clang_major__ < 10) || defined(__APPLE__)))
#define HAVE_VECTOR_TERNARY_OPERATOR 1
#else
#define HAVE_VECTOR_TERNARY_OPERATOR 0
#endif
// Do we additionally support the clang
// __builtin_convertvector
// GCC>11 does
#if HAVE_VECTOR_SIZE_ATTRIBUTE && (defined(__clang__) || (__GNUC__ >= 11))
// GCC>=9 does
#if HAVE_VECTOR_SIZE_ATTRIBUTE && (defined(__clang__) || (__GNUC__ >= 9))
#define HAVE_CONVERT_VECTOR 1
#else
#define HAVE_CONVERT_VECTOR 0
......
......@@ -31,7 +31,7 @@
* ++, --, +,-,*,/,%, =, &,|,^,~, >>,<<, !, &&, ||,
* ==, !=, >, <, >=, <=, =, sizeof and Initialization from brace-enclosed lists
*
* Furthemore the GCC and clang>=10 vector types support the ternary operator.
* Furthemore the GCC and clang (>=10) vector types support the ternary operator.
*
* We also support some additional operations.
*
......@@ -465,7 +465,7 @@ template<typename VEC>
inline void
vselect(VEC& dst, const VEC& a, const VEC& b, const mask_type_t<VEC>& mask)
{
#if !HAVE_VECTOR_TERNARY_OPERATOR || WANT_VECTOR_FALLBACK
#if !HAVE_VECTOR_SIZE_ATTRIBUTE || WANT_VECTOR_FALLBACK
constexpr size_t N = vec_size<VEC>();
for (size_t i = 0; i < N; ++i) {
dst[i] = mask[i] ? a[i] : b[i];
......@@ -483,7 +483,7 @@ template<typename VEC>
inline void
vmin(VEC& dst, const VEC& a, const VEC& b)
{
#if !HAVE_VECTOR_TERNARY_OPERATOR || WANT_VECTOR_FALLBACK
#if !HAVE_VECTOR_SIZE_ATTRIBUTE || WANT_VECTOR_FALLBACK
constexpr size_t N = vec_size<VEC>();
for (size_t i = 0; i < N; ++i) {
dst[i] = a[i] < b[i] ? a[i] : b[i];
......@@ -501,7 +501,7 @@ template<typename VEC>
inline void
vmax(VEC& dst, const VEC& a, const VEC& b)
{
#if !HAVE_VECTOR_TERNARY_OPERATOR || WANT_VECTOR_FALLBACK
#if !HAVE_VECTOR_SIZE_ATTRIBUTE || WANT_VECTOR_FALLBACK
constexpr size_t N = vec_size<VEC>();
for (size_t i = 0; i < N; ++i) {
dst[i] = a[i] > b[i] ? a[i] : b[i];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment