@@ -187,7 +187,7 @@ inline constexpr RetT extend_vbinary2(AT a, BT b, RetT c,
187
187
if constexpr (NeedAdd) {
188
188
return temp[0 ] + temp[1 ] + c;
189
189
}
190
- return sycl::vec<IntT, 2 >{temp[0 ], temp[1 ]}.template as <sycl::vec<RetT, 1 >>();
190
+ return static_cast <RetT>( sycl::vec<IntT, 2 >{temp[0 ], temp[1 ]}.template as <sycl::vec<RetT, 1 >>() );
191
191
}
192
192
193
193
template <typename RetT, bool NeedSat, bool NeedAdd, typename AT, typename BT,
@@ -213,8 +213,9 @@ inline constexpr RetT extend_vbinary4(AT a, BT b, RetT c,
213
213
return temp[0 ] + temp[1 ] + temp[2 ] + temp[3 ] + c;
214
214
}
215
215
216
- return sycl::vec<IntT, 4 >{temp[0 ], temp[1 ], temp[2 ], temp[3 ]}
217
- .template as <sycl::vec<RetT, 1 >>();
216
+ return static_cast <RetT>(
217
+ sycl::vec<IntT, 4 >{temp[0 ], temp[1 ], temp[2 ], temp[3 ]}
218
+ .template as <sycl::vec<RetT, 1 >>());
218
219
}
219
220
220
221
template <typename ValueT> inline bool isnan (const ValueT a) {
@@ -610,7 +611,7 @@ inline unsigned vectorized_unary(unsigned a, const UnaryOperation unary_op) {
610
611
auto v1 = v0.as <VecT>();
611
612
auto v2 = unary_op (v1);
612
613
v0 = v2.template as <sycl::vec<unsigned , 1 >>();
613
- return v0 ;
614
+ return unsigned {v0} ;
614
615
}
615
616
616
617
// / Compute vectorized absolute difference for two values without modulo
@@ -663,7 +664,7 @@ inline unsigned vectorized_isgreater<sycl::ushort2, unsigned>(unsigned a,
663
664
v4[0 ] = v2[0 ] > v3[0 ];
664
665
v4[1 ] = v2[1 ] > v3[1 ];
665
666
v0 = v4.template as <sycl::vec<unsigned , 1 >>();
666
- return v0 ;
667
+ return unsigned {v0} ;
667
668
}
668
669
669
670
// / Returns min(max(val, min_val), max_val)
@@ -989,7 +990,7 @@ inline unsigned vectorized_binary(unsigned a, unsigned b,
989
990
auto v4 =
990
991
detail::vectorized_binary<VecT, BinaryOperation>()(v2, v3, binary_op);
991
992
v0 = v4.template as <sycl::vec<unsigned , 1 >>();
992
- return v0 ;
993
+ return unsigned {v0} ;
993
994
}
994
995
995
996
template <typename T1, typename T2>
0 commit comments