Description
Table 161 of the SYCL 2020 spec revision 4 provides the following relevant descriptions:
floatn: float{n}, mfloat{n}, marray<{N},float>
genfloatf: float, floatn
genfloat: genfloatf, genfloatd, genfloath
where
{N} means any positive value of size_t type.
The spec then defines math functions such as:
genfloat acos (genfloat x)
which are implemented in intel/llvm as (https://github.com/intel/llvm/blob/sycl/sycl/include/CL/sycl/builtins.hpp):
// genfloat acos (genfloat x)
template <typename T>
detail::enable_if_t<detail::is_genfloat<T>::value, T> acos(T x) __NOEXC {
return __sycl_std::__invoke_acos<T>(x);
}
Now if we follow the definition of genfloat
type trait and sub traits eventually we get that the subset of marray types contained within genfloat
is defined by marray_float_list
as:
using marray_float_list =
type_list<marray<float, 1>, marray<float, 2>, marray<float, 3>,
marray<float, 4>, marray<float, 8>, marray<float, 16>>;
i.e. this covers the set {n} : (from the sycl spec)
where {n} means 2,3,4,8,16
which does not match the set from the sycl spec which covers {N}
defined above.
This means that we should increase marray_float_list
to cover the complete set {N}
, unless there is a good reason that only the limited {n} is supported by the sycl Math functions (In which case the SYCL spec should be updated)?