1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-17 15:27:06 +01:00

Compiles GPU and CPU, still gives good performance on CPU

This commit is contained in:
Peter Boyle
2019-06-05 13:28:16 +01:00
parent 18d3cde29a
commit 0ee6e77cbc
71 changed files with 1512 additions and 33769 deletions

View File

@ -267,11 +267,12 @@ struct getVectorType{
template<typename T>
class isSIMDvectorized{
template<typename U>
static typename std::enable_if< !std::is_same< typename GridTypeMapper<typename getVectorType<U>::type>::scalar_type,
typename GridTypeMapper<typename getVectorType<U>::type>::vector_type>::value, char>::type test(void *);
static typename std::enable_if<
!std::is_same< typename GridTypeMapper<typename getVectorType<U>::type>::scalar_type,
typename GridTypeMapper<typename getVectorType<U>::type>::vector_type>::value,
char>::type test(void *);
template<typename U>
static double test(...);
template<typename U> static double test(...);
public:
enum {value = sizeof(test<T>(0)) == sizeof(char) };