aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/arch/SYCL
diff options
context:
space:
mode:
authorGravatar Gustavo Lima Chaves <gustavo.lima.chaves@intel.com>2018-12-19 14:24:44 -0800
committerGravatar Gustavo Lima Chaves <gustavo.lima.chaves@intel.com>2018-12-19 14:24:44 -0800
commite763fcd09e620300226ca22d152b94867123b603 (patch)
tree8f2546814d92e2f460e2b1abe385d96d50e1ef73 /Eigen/src/Core/arch/SYCL
parentefa4c9c40fbed9506aaef6a5393d27713f161984 (diff)
Introducing "vectorized" byte on unpacket_traits structs
This is a preparation to a change on gebp_traits, where a new template argument will be introduced to dictate the packet size, so it won't be bound to the current/max packet size only anymore. By having packet types defined early on gebp_traits, one has now to act on packet types, not scalars anymore, for the enum values defined on that class. One approach for reaching the vectorizable/size properties one needs there could be getting the packet's scalar again with unpacket_traits<>, then the size/Vectorizable enum entries from packet_traits<>. It turns out guards like "#ifndef EIGEN_VECTORIZE_AVX512" at AVX/PacketMath.h will hide smaller packet variations of packet_traits<> for some types (and it makes sense to keep that). In other words, one can't go back to the scalar and create a new PacketType, as this will always lead to the maximum packet type for the architecture. The less costly/invasive solution for that, thus, is to add the vectorizable info on every unpacket_traits struct as well.
Diffstat (limited to 'Eigen/src/Core/arch/SYCL')
-rw-r--r--Eigen/src/Core/arch/SYCL/InteropHeaders.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/Core/arch/SYCL/InteropHeaders.h b/Eigen/src/Core/arch/SYCL/InteropHeaders.h
index c1da40d14..294cb101a 100644
--- a/Eigen/src/Core/arch/SYCL/InteropHeaders.h
+++ b/Eigen/src/Core/arch/SYCL/InteropHeaders.h
@@ -88,7 +88,7 @@ SYCL_ARITHMETIC(cl::sycl::cl_double2)
#define SYCL_UNPACKET_TRAITS(packet_type, unpacket_type, lengths)\
template<> struct unpacket_traits<packet_type> {\
typedef unpacket_type type;\
- enum {size=lengths, alignment=Aligned16};\
+ enum {size=lengths, alignment=Aligned16, vectorizable=true};\
typedef packet_type half;\
};
SYCL_UNPACKET_TRAITS(cl::sycl::cl_float4, float, 4)