@@ -95,10 +95,14 @@ DefGenericCastToPtrExpl(ToGlobal, OCL_GLOBAL);
9595 DefSubgroupBlockINTEL_vt (Type, v8)
9696
9797namespace ncpu_types {
98+ template <typename DataT, int NumElements>
99+ using native_vector_t =
100+ sycl::detail::ConvertToOpenCLType_t<sycl::vec<DataT, NumElements>>;
101+
98102template <class T > struct vtypes {
99- using v2 = typename sycl::vec <T, 2 >:: vector_t ;
100- using v4 = typename sycl::vec <T, 4 >:: vector_t ;
101- using v8 = typename sycl::vec <T, 8 >:: vector_t ;
103+ using v2 = native_vector_t <T, 2 >;
104+ using v4 = native_vector_t <T, 4 >;
105+ using v8 = native_vector_t <T, 8 >;
102106};
103107} // namespace ncpu_types
104108
@@ -224,15 +228,15 @@ DefineLogicalGroupOp(bool, bool, i1);
224228 } \
225229 \
226230 DEVICE_EXTERNAL Type __spirv_GroupBroadcast ( \
227- int32_t g, Type v, sycl::vec <IDType, 2 >:: vector_t l) noexcept { \
231+ int32_t g, Type v, ncpu_types:: native_vector_t <IDType, 2 > l) noexcept { \
228232 if (__spv::Scope::Flag::Subgroup == g) \
229233 return __mux_sub_group_broadcast_##Sfx (v, l[0 ]); \
230234 else \
231235 return __mux_work_group_broadcast_##Sfx (0 , v, l[0 ], l[1 ], 0 ); \
232236 } \
233237 \
234238 DEVICE_EXTERNAL Type __spirv_GroupBroadcast ( \
235- int32_t g, Type v, sycl::vec <IDType, 3 >:: vector_t l) noexcept { \
239+ int32_t g, Type v, ncpu_types:: native_vector_t <IDType, 3 > l) noexcept { \
236240 if (__spv::Scope::Flag::Subgroup == g) \
237241 return __mux_sub_group_broadcast_##Sfx (v, l[0 ]); \
238242 else \
@@ -310,8 +314,8 @@ DefShuffleINTEL_All(float, f32, float);
310314DefShuffleINTEL_All (_Float16, f16 , _Float16);
311315
312316#define DefineShuffleVec (T, N, Sfx, MuxType ) \
313- using vt##T##N = sycl::vec <T, N>:: vector_t ; \
314- using vt##MuxType##N = sycl::vec <MuxType, N>:: vector_t ; \
317+ using vt##T##N = ncpu_types:: native_vector_t <T, N>; \
318+ using vt##MuxType##N = ncpu_types:: native_vector_t <MuxType, N>; \
315319 DefShuffleINTEL_All (vt##T##N, v##N##Sfx, vt##MuxType##N)
316320
317321#define DefineShuffleVec2to16 (Type, Sfx, MuxType ) \
0 commit comments