@@ -2230,6 +2230,8 @@ template <typename T, int N> struct VecStorageImpl;
2230
2230
#ifdef __SYCL_USE_EXT_VECTOR_TYPE__
2231
2231
template <typename T, int N> struct VecStorageImpl {
2232
2232
using DataType = T __attribute__ ((ext_vector_type(N)));
2233
+ using VectorDataType =
2234
+ DataType; // to unify code with preview breaking changes mode
2233
2235
};
2234
2236
#else
2235
2237
// When ext_vector_type is not available, we rely on cl_* types from CL/cl.h
@@ -2238,6 +2240,8 @@ template <typename T, int N> struct VecStorageImpl;
2238
2240
#define __SYCL_DEFINE_VECSTORAGE_IMPL (type, cl_type, num ) \
2239
2241
template <> struct VecStorageImpl <type, num> { \
2240
2242
using DataType = ::cl_##cl_type##num; \
2243
+ using VectorDataType = \
2244
+ DataType; /* to unify code with preview breaking changes mode */ \
2241
2245
};
2242
2246
#endif // __SYCL_USE_EXT_VECTOR_TYPE__
2243
2247
#endif // !defined(__INTEL_PREVIEW_BREAKING_CHANGES)
@@ -2268,9 +2272,7 @@ __SYCL_DEFINE_VECSTORAGE_IMPL_FOR_TYPE(double, double)
2268
2272
// Single element bool
2269
2273
template <> struct VecStorage <bool , 1 , void > {
2270
2274
using DataType = bool ;
2271
- #ifdef __INTEL_PREVIEW_BREAKING_CHANGES
2272
2275
using VectorDataType = bool ;
2273
- #endif // __INTEL_PREVIEW_BREAKING_CHANGES
2274
2276
};
2275
2277
2276
2278
// Multiple element bool
@@ -2280,32 +2282,26 @@ struct VecStorage<bool, N, typename std::enable_if_t<isValidVectorSize(N)>> {
2280
2282
typename VecStorageImpl<select_apply_cl_t <bool , std::int8_t , std::int16_t ,
2281
2283
std::int32_t , std::int64_t >,
2282
2284
N>::DataType;
2283
- #ifdef __INTEL_PREVIEW_BREAKING_CHANGES
2284
2285
using VectorDataType =
2285
2286
typename VecStorageImpl<select_apply_cl_t <bool , std::int8_t , std::int16_t ,
2286
2287
std::int32_t , std::int64_t >,
2287
2288
N>::VectorDataType;
2288
- #endif // __INTEL_PREVIEW_BREAKING_CHANGES
2289
2289
};
2290
2290
2291
2291
// Single element signed integers
2292
2292
template <typename T>
2293
2293
struct VecStorage <T, 1 , typename std::enable_if_t <is_sigeninteger_v<T>>> {
2294
2294
using DataType = select_apply_cl_t <T, std::int8_t , std::int16_t , std::int32_t ,
2295
2295
std::int64_t >;
2296
- #ifdef __INTEL_PREVIEW_BREAKING_CHANGES
2297
2296
using VectorDataType = DataType;
2298
- #endif // __INTEL_PREVIEW_BREAKING_CHANGES
2299
2297
};
2300
2298
2301
2299
// Single element unsigned integers
2302
2300
template <typename T>
2303
2301
struct VecStorage <T, 1 , typename std::enable_if_t <is_sugeninteger_v<T>>> {
2304
2302
using DataType = select_apply_cl_t <T, std::uint8_t , std::uint16_t ,
2305
2303
std::uint32_t , std::uint64_t >;
2306
- #ifdef __INTEL_PREVIEW_BREAKING_CHANGES
2307
2304
using VectorDataType = DataType;
2308
- #endif // __INTEL_PREVIEW_BREAKING_CHANGES
2309
2305
};
2310
2306
2311
2307
// Single element floating-point (except half)
@@ -2314,9 +2310,7 @@ struct VecStorage<
2314
2310
T, 1 , typename std::enable_if_t <!is_half_v<T> && is_sgenfloat_v<T>>> {
2315
2311
using DataType =
2316
2312
select_apply_cl_t <T, std::false_type, std::false_type, float , double >;
2317
- #ifdef __INTEL_PREVIEW_BREAKING_CHANGES
2318
2313
using VectorDataType = DataType;
2319
- #endif // __INTEL_PREVIEW_BREAKING_CHANGES
2320
2314
};
2321
2315
// Multiple elements signed/unsigned integers and floating-point (except half)
2322
2316
template <typename T, int N>
@@ -2327,33 +2321,22 @@ struct VecStorage<
2327
2321
(is_sgenfloat_v<T> && !is_half_v<T>))>> {
2328
2322
using DataType =
2329
2323
typename VecStorageImpl<typename VecStorage<T, 1 >::DataType, N>::DataType;
2330
- #ifdef __INTEL_PREVIEW_BREAKING_CHANGES
2331
2324
using VectorDataType =
2332
2325
typename VecStorageImpl<typename VecStorage<T, 1 >::DataType,
2333
2326
N>::VectorDataType;
2334
- #endif // __INTEL_PREVIEW_BREAKING_CHANGES
2335
2327
};
2336
2328
2337
2329
// Single element half
2338
2330
template <> struct VecStorage <half, 1 , void > {
2339
2331
using DataType = sycl::detail::half_impl::StorageT;
2340
- #ifdef __INTEL_PREVIEW_BREAKING_CHANGES
2341
2332
using VectorDataType = sycl::detail::half_impl::StorageT;
2342
- #endif // __INTEL_PREVIEW_BREAKING_CHANGES
2343
2333
};
2344
2334
// Multiple elements half
2345
- #ifdef __INTEL_PREVIEW_BREAKING_CHANGES
2346
2335
#define __SYCL_DEFINE_HALF_VECSTORAGE (Num ) \
2347
2336
template <> struct VecStorage <half, Num, void > { \
2348
2337
using DataType = sycl::detail::half_impl::Vec##Num##StorageT; \
2349
2338
using VectorDataType = sycl::detail::half_impl::Vec##Num##StorageT; \
2350
2339
};
2351
- #else // __INTEL_PREVIEW_BREAKING_CHANGES
2352
- #define __SYCL_DEFINE_HALF_VECSTORAGE (Num ) \
2353
- template <> struct VecStorage <half, Num, void > { \
2354
- using DataType = sycl::detail::half_impl::Vec##Num##StorageT; \
2355
- };
2356
- #endif
2357
2340
2358
2341
__SYCL_DEFINE_HALF_VECSTORAGE (2 )
2359
2342
__SYCL_DEFINE_HALF_VECSTORAGE(3 )
0 commit comments