OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
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
15template<typename T, typename Sfinae = void>
16struct is_const_field: std::false_type {};
17
27template<typename T>
28struct is_const_field<T, typename Void<typename T::const_field>::type> : std::true_type
29{};
30
31
32template<typename T, typename Sfinae = void>
33struct has_val_pos: std::false_type {};
34
35
47template<typename T>
48struct has_val_pos<T, typename Void<typename T::with_position >::type> : std::true_type
49{};
50
51
52
53template<typename T, typename Sfinae = void>
54struct is_testing: std::false_type {};
55
56
67template<typename T>
68struct is_testing<T, typename Void<typename T::testing >::type> : std::true_type
69{};
70
71
82template<typename T, unsigned int dims, typename stype, typename decomposition, bool stub=is_testing<T>::value>
84{
87};
88
90template<typename T, unsigned int dims, typename stype, typename decomposition>
91struct stub_or_real<T,dims,stype,decomposition,false>
92{
95};
96
97#endif /* OPENFPM_NUMERICS_SRC_UTIL_UTIL_NUM_HPP_ */
This is a distributed grid.
Void structure.
Definition common.hpp:74
grid_dist_id< dims, stype, aggregate< size_t >, decomposition > type
switch type if we are on testing or not
Definition util_num.hpp:94
In case of testing return a stub grid.
Definition util_num.hpp:84
grid_dist_testing< dims > type
switch type if we are on testing or not
Definition util_num.hpp:86