OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
openfpm Namespace Reference

convert a type into constant type More...

Data Structures

struct  add_prp_device_impl
 
struct  add_prp_device_impl< true, T, Memory, layout_base, grow_p >
 
struct  add_prp_impl
 struct to merge two vectors More...
 
struct  add_prp_impl< OBJECT_ADD, vect_dst >
 struct to merge two vectors More...
 
class  array
 
class  array< T, 0 >
 
class  array_view_gen_openfpm
 
class  c_storage_order
 
class  const_array_view_gen_openfpm
 
class  const_multi_array_ref_openfpm
 
class  const_subarray_gen_openfpm
 
struct  copy_two_vectors_activate_impl
 
struct  copy_two_vectors_activate_impl< true >
 
struct  cpu_block_process
 
struct  cpu_block_process< reduction_type, 3 >
 
struct  cpu_block_process< reduction_type, VECTOR_SPARSE_BLOCK >
 
struct  Debug
 
class  fortran_storage_order
 
class  general_storage_order
 
class  grow_policy_double
 Grow policy define how the vector should grow every time we exceed the size. More...
 
class  grow_policy_identity
 Grow policy define how the vector should grow every time we exceed the size. More...
 
class  grow_policy_page
 Grow policy define how the vector should grow every time we exceed the size. More...
 
struct  htoD
 
struct  is_multi_array
 
struct  is_multi_array< T, typename Void< typename T::yes_is_multi_array >::type >
 has_noPointers check if a type has defined a method called noPointers More...
 
struct  merge_prp_device_impl
 
struct  merge_prp_device_impl< true, T, Memory, layout_base, grow_p >
 
class  multi_array_ref_openfpm
 
class  ofp_storage_order
 
struct  reorder
 
struct  scalar_block_implementation_switch
 Functor switch to select the vector sparse for standars scalar and blocked implementation. More...
 
struct  scalar_block_implementation_switch< 2, block_functor >
 
struct  sparse_index
 
struct  sparse_vector_reduction
 this class is a functor for "for_each" algorithm More...
 
struct  sparse_vector_reduction_cpu
 this class is a functor for "for_each" algorithm More...
 
struct  sparse_vector_reduction_cpu_impl
 
struct  sparse_vector_reduction_cpu_impl< reduction_type, vector_reduction, T, impl, red_type[N1]>
 
struct  sparse_vector_reduction_solve_conflict_assign_cpu
 this class is a functor for "for_each" algorithm More...
 
struct  sparse_vector_reduction_solve_conflict_reduce_cpu
 this class is a functor for "for_each" algorithm More...
 
struct  sparse_vector_reduction_solve_conflict_reduce_cpu_impl
 
struct  sparse_vector_reduction_solve_conflict_reduce_cpu_impl< impl, vector_reduction, T, red_type[N1]>
 
struct  sparse_vector_special
 this class is a functor for "for_each" algorithm More...
 
struct  stub_block_functor
 
class  subarray_gen_openfpm
 
struct  vect_isel
 It analyze the type given and it select correctly the implementation for vector. More...
 
class  vector
 Implementation of 1-D std::vector like structure. More...
 
class  vector< T, HeapMemory, memory_traits_lin, grow_p, STD_VECTOR >
 Implementation of 1-D std::vector like structure. More...
 
class  vector< T, Memory, layout_base, grow_p, OPENFPM_NATIVE >
 Implementation of 1-D std::vector like structure. More...
 
class  vector< T, PtrMemory, memory_traits_lin, gp, STD_VECTOR >
 
class  vector_fr
 Implementation of 1-D std::vector like structure. More...
 
struct  vector_gpu_ker
 grid interface available when on gpu More...
 
struct  vector_gpu_ker_ref
 grid interface available when on gpu More...
 
class  vector_key_iterator
 Vector iterator. More...
 
class  vector_key_iterator_ele
 Vector iterator. More...
 
class  vector_key_iterator_seq
 Vector iterator. More...
 
class  vector_sparse
 
class  vector_sparse_gpu_ker
 

Typedefs

template<typename T >
using vector_std = vector< T, HeapMemory, memory_traits_lin, openfpm::grow_policy_double, STD_VECTOR >
 
template<typename T >
using vector_gpu = openfpm::vector< T, CudaMemory, memory_traits_inte >
 
template<typename T >
using vector_gpu_lin = openfpm::vector< T, CudaMemory, memory_traits_lin >
 
template<typename T >
using vector_gpu_single = openfpm::vector< T, CudaMemory, memory_traits_inte, openfpm::grow_policy_identity >
 
template<typename T >
using vector_custd = vector< T, CudaMemory, memory_traits_inte, openfpm::grow_policy_double, STD_VECTOR >
 
typedef grow_policy_double vector_grow_policy_default
 default grow policy
 
template<typename T , unsigned int blockSwitch = VECTOR_SPARSE_STANDARD, typename block_functor = stub_block_functor, typename indexT = int>
using vector_sparse_gpu = openfpm::vector_sparse< T, indexT, CudaMemory, typename memory_traits_inte< T >::type, memory_traits_inte, grow_policy_double, vect_isel< T >::value, blockSwitch, block_functor >
 
template<typename T , typename block_functor = stub_block_functor, typename indexT = long int>
using vector_sparse_gpu_block = openfpm::vector_sparse< T, indexT, CudaMemory, typename memory_traits_inte< T >::type, memory_traits_inte, grow_policy_double, vect_isel< T >::value, VECTOR_SPARSE_BLOCK, block_functor >
 

Functions

template<unsigned int p, typename aggr >
auto at_c (aggr &agg) -> decltype(boost::fusion::at_c< p >(agg.data))
 
template<unsigned int p, typename aggr >
auto get (aggr &agg) -> decltype(boost::fusion::at_c< p >(agg.data))
 
template<class T >
constexpr std::add_const< T >::type & as_const (T &t) noexcept
 
template<class T , std::size_t N>
bool operator== (const array< T, N > &x, const array< T, N > &y)
 
template<class T , std::size_t N>
bool operator< (const array< T, N > &x, const array< T, N > &y)
 
template<class T , std::size_t N>
bool operator!= (const array< T, N > &x, const array< T, N > &y)
 
template<class T , std::size_t N>
bool operator> (const array< T, N > &x, const array< T, N > &y)
 
template<class T , std::size_t N>
bool operator<= (const array< T, N > &x, const array< T, N > &y)
 
template<class T , std::size_t N>
bool operator>= (const array< T, N > &x, const array< T, N > &y)
 
template<class T , std::size_t N>
void swap (array< T, N > &x, array< T, N > &y)
 
template<typename T , std::size_t N>
T(& get_c_array (openfpm::array< T, N > &arg))[N]
 
template<typename T , std::size_t N>
const T(& get_c_array (const openfpm::array< T, N > &arg))[N]
 
template<class It >
std::size_t hash_range (It, It)
 
template<class T , std::size_t N>
std::size_t hash_value (const array< T, N > &arr)
 
template<size_t Idx, typename T , size_t N>
T & get (openfpm::array< T, N > &arr) noexcept
 
template<size_t Idx, typename T , size_t N>
const T & get (const openfpm::array< T, N > &arr) noexcept
 
template<typename T , typename P >
auto distance (T exp1, P exp2) -> decltype(norm(exp1 - exp2))
 General distance formula. More...
 

Variables

constexpr int VECTOR_SPARSE_STANDARD = 1
 
constexpr int VECTOR_SPARSE_BLOCK = 2
 

Detailed Description

convert a type into constant type

this set of meta-functions traverse at compile time the tree-structure of types in Depth-first search. and transform any root node of type vector into vector_gpu_ker

Parameters
Ttype tp convert
Returns
a constant of the type T

Consider

vector_gpu<aggregate<int,vector_gpu<aggregate<int,float>>>>

is a tree in this form

*
*                           * vector_gpu<aggregate<...>>
*                          / \
*                         /   \
*                        /     \
*                      int      * vector_gpu<aggregate<...>>
*                              / \
*                             /   \
*                            /     \
*                          int    float
*
* 

The vector is transformed at compile-time into

is a tree in this form

*
*                           * vector_gpu_ker<aggregate<...>>
*                          / \
*                         /   \
*                        /     \
*                      int      * vector_gpu_ker<aggregate<...>>
*                              / \
*                             /   \
*                            /     \
*                          int    float
*
* 

Function Documentation

◆ distance()

template<typename T , typename P >
auto openfpm::distance ( exp1,
P  exp2 
) -> decltype(norm(exp1 - exp2))

General distance formula.

Definition at line 521 of file vector_dist_operators_functions.hpp.