FIAS . Impressum . Privacy

test if a type can be vectorized

Kay F. Jahnke [please enable javascript to see the address]
Thu Oct 5 14:33:50 CEST 2017


Am 05.10.2017 um 11:11 schrieb Matthias Kretz:
> Ah yes. This can be generalized further to:
> 
> template <class T> struct is_valid_vector_argument
>    : public std::false_type {};
> template <> struct is_valid_vector_argument<double>
>    : public std::true_type {};
> template <> struct is_valid_vector_argument<float>
>    : public std::true_type {};
> template <> struct is_valid_vector_argument<int>
>    : public std::true_type {};
> template <> struct is_valid_vector_argument<uint>
>    : public std::true_type {};
> template <> struct is_valid_vector_argument<short>
>    : public std::true_type {};
> template <> struct is_valid_vector_argument<ushort>
>    : public std::true_type {};
> 
> And then:
> template <class T> struct
> is_simd_vector_internal<Vector<T, VectorAbi::Avx>>
>    : public is_valid_vector_argument<T> {};
> 
> I'd accept a pull request.;-)

Done, hopefully correctly. please check.
Have never done this before.
I committed to a new feature branch 'vectorizable'
and set 1.3 as the target. see

https://github.com/VcDevel/Vc/pull/176

with regards

Kay F. Jahnke



More information about the Vc mailing list
FIAS . Impressum . Privacy