OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
util_num.hpp
1 /*
2  * util_num.hpp
3  *
4  * Created on: Oct 23, 2015
5  * Author: i-bird
6  */
7 
8 #ifndef OPENFPM_NUMERICS_SRC_UTIL_UTIL_NUM_HPP_
9 #define OPENFPM_NUMERICS_SRC_UTIL_UTIL_NUM_HPP_
10 
11 #include "util/common.hpp"
12 #include "grid_dist_testing.hpp"
13 #include "Grid/grid_dist_id.hpp"
14 
15 template<typename T, typename Sfinae = void>
16 struct is_const_field: std::false_type {};
17 
27 template<typename T>
28 struct is_const_field<T, typename Void<typename T::const_field>::type> : std::true_type
29 {};
30 
31 
32 template<typename T, typename Sfinae = void>
33 struct has_val_pos: std::false_type {};
34 
35 
47 template<typename T>
48 struct has_val_pos<T, typename Void<typename T::with_position >::type> : std::true_type
49 {};
50 
51 
52 
53 template<typename T, typename Sfinae = void>
54 struct is_testing: std::false_type {};
55 
56 
67 template<typename T>
68 struct is_testing<T, typename Void<typename T::testing >::type> : std::true_type
69 {};
70 
71 
82 template<typename T, unsigned int dims, typename stype, typename decomposition, bool stub=is_testing<T>::value>
84 {
87 };
88 
90 template<typename T, unsigned int dims, typename stype, typename decomposition>
91 struct stub_or_real<T,dims,stype,decomposition,false>
92 {
95 };
96 
97 #endif /* OPENFPM_NUMERICS_SRC_UTIL_UTIL_NUM_HPP_ */
In case of testing return a stub grid.
Definition: util_num.hpp:83
grid_dist_id< dims, stype, aggregate< size_t >, decomposition > type
switch type if we are on testing or not
Definition: util_num.hpp:94
grid_dist_testing< dims > type
switch type if we are on testing or not
Definition: util_num.hpp:86
This is a distributed grid.
Void structure.
Definition: common.hpp:63