6 #include "memory/memory.hpp" 7 #include "util/for_each_ref.hpp" 8 #include "util/variadic_to_vmpl.hpp" 10 constexpr
int RUN_ON_DEVICE = 1024;
12 #define GCC_VERSION (__GNUC__ * 10000 \ 13 + __GNUC_MINOR__ * 100 \ 14 + __GNUC_PATCHLEVEL__) 17 template<
unsigned int N,
typename T>
26 inline static std::string to_string(std::string s)
43 constexpr
typename std::add_const<T>::type & as_const(T& t) noexcept
48 template <
typename>
struct Debug;
63 template<
size_t index,
size_t N>
struct Fill_two {
68 template<
size_t index,
size_t N>
struct Fill_one {
73 template<
typename>
struct Void 79 template<
typename T,
typename Sfinae =
void>
95 struct has_attributes<T, typename
Void<decltype( T::attributes::name[0] )>::type> : std::true_type
98 template<
typename T,
typename Sfinae =
void>
115 template<
typename T,
typename Sfinae =
void>
131 template<
typename T,
typename Sfinae =
void>
138 struct has_set_d<T, typename
Void<decltype( std::declval<T>().set_d(0,0) )>::type> : std::true_type
141 template<
typename T,
typename Sfinae =
void>
154 struct has_data<T, typename
Void<decltype( T::data )>::type> : std::true_type
157 template<
typename T,
typename Sfinae =
void>
188 template<
bool cond,
typename T>
193 value = std::is_same<decltype(std::declval<T>().data),
typename T::type>::value
208 template<
typename T,
typename Sfinae =
void>
239 template<
typename ObjType,
typename Sfinae =
void>
242 template<
typename ObjType>
243 struct has_pack<ObjType, typename
Void<decltype( ObjType::pack() )>::type> : std::true_type
258 template<
typename ObjType,
typename Sfinae =
void>
261 template<
typename ObjType>
262 struct has_toKernel<ObjType, typename
Void<decltype( std::declval<ObjType>().toKernel() )>::type> : std::true_type
277 template<
typename ObjType,
typename Sfinae =
void>
280 template<
typename ObjType>
297 template<
typename ObjType,
typename Sfinae =
void>
308 template<
typename ObjType>
309 struct has_packMem<ObjType, typename
Void<decltype( ObjType::packMem() )>::type> : std::true_type
322 template<typename T, bool = is_typedef_and_data_same<has_typedef_type<T>::value &&
has_data<T>::value,T>::value>
331 template<
typename T,
typename Sfinae =
void>
350 enum { value = index + N };
355 enum { value = index };
360 template<
typename ObjType,
typename Sfinae =
void>
363 constexpr
static bool value()
369 template<
typename ObjType>
370 struct isDynStruct<ObjType, typename
Void<decltype( ObjType::isCompressed() )>::type> : std::true_type
372 constexpr
static bool value()
374 return ObjType::isCompressed();
378 template<
typename T,
typename Sfinae =
void>
388 struct is_Box<T, typename
Void< typename T::yes_is_box>::type> : std::true_type
391 template<
typename T,
typename Sfinae =
void>
401 struct is_Point<T, typename
Void< typename T::yes_is_point>::type> : std::true_type
convert a type into constant type
has_Pack check if a type has defined a method called Pack
check if T::type and T.data has the same type
has_packRequest check if a type has defined a method called packRequest
is_openfpm_native check if a type is an openfpm native structure type
Compile time array functor needed to generate array at compile-time of type.
has_calculateMem check if a type has defined a method called calculateMem
void type
define void type
has_toKernel check if a type has defined a method called toKernel