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