|
| void | grids_reconstruct (openfpm::vector< openfpm::vector< aggregate< device_grid, Box< dim, long int >>>> &m_oGrid_recv, openfpm::vector< device_grid > &loc_grid, openfpm::vector< GBoxes< device_grid::dims >> &gdb_ext, CellDecomposer_sm< dim, St, shift< dim, St >> &cd_sm) |
| | Reconstruct the local grids. More...
|
| |
| template<typename lambda_t > |
| void | labelIntersectionGridsProcessor_and_pack (Decomposition &dec, CellDecomposer_sm< dim, St, shift< dim, St >> &cd_sm, openfpm::vector< device_grid > &loc_grid_old, openfpm::vector< GBoxes< device_grid::dims >> &gdb_ext, openfpm::vector< GBoxes< device_grid::dims >> &gdb_ext_old, openfpm::vector< GBoxes< device_grid::dims >> &gdb_ext_global, size_t p_id_cur, lambda_t f) |
| | Label intersection grids for mappings. More...
|
| |
|
template<int ... prp> |
| void | unpack_buffer_to_local_grid (openfpm::vector< device_grid > &loc_grid, openfpm::vector< GBoxes< device_grid::dims >> &gdb_ext, ExtPreAlloc< Memory > &send_buffer, size_t sz) |
| | Unpack.
|
| |
| template<int ... prp> |
| void | map_ (Decomposition &dec, CellDecomposer_sm< dim, St, shift< dim, St >> &cd_sm, openfpm::vector< device_grid > &loc_grid, openfpm::vector< device_grid > &loc_grid_old, openfpm::vector< GBoxes< device_grid::dims >> &gdb_ext, openfpm::vector< GBoxes< device_grid::dims >> &gdb_ext_old, openfpm::vector< GBoxes< device_grid::dims >> &gdb_ext_global, size_t opt) |
| | Moves all the grids that does not belong to the local processor to the respective processor. More...
|
| |
| template<int... prp> |
| void | ghost_get_ (const openfpm::vector< ip_box_grid< dim >> &ig_box, const openfpm::vector< ep_box_grid< dim >> &eg_box, const openfpm::vector< i_lbox_grid< dim >> &loc_ig_box, const openfpm::vector< e_lbox_grid< dim >> &loc_eg_box, const openfpm::vector< GBoxes< device_grid::dims >> &gdb_ext, const openfpm::vector< e_box_multi< dim >> &eb_gid_list, bool use_bx_def, openfpm::vector< device_grid > &loc_grid, const grid_sm< dim, void > &ginfo, std::unordered_map< size_t, size_t > &g_id_to_external_ghost_box, size_t opt) |
| | It fill the ghost part of the grids. More...
|
| |
| template<template< typename, typename > class op, int... prp> |
| void | ghost_put_ (Decomposition &dec, const openfpm::vector< ip_box_grid< dim >> &ig_box, const openfpm::vector< ep_box_grid< dim >> &eg_box, const openfpm::vector< i_lbox_grid< dim >> &loc_ig_box, const openfpm::vector< e_lbox_grid< dim >> &loc_eg_box, const openfpm::vector< GBoxes< device_grid::dims >> &gdb_ext, openfpm::vector< device_grid > &loc_grid, openfpm::vector< std::unordered_map< size_t, size_t >> &g_id_to_internal_ghost_box) |
| | It merge the information in the ghost with the real information. More...
|
| |
|
| grid_dist_id_comm () |
| | Constructor.
|
| |
| | grid_dist_id_comm (const grid_dist_id_comm< dim, St, T, Decomposition, Memory, device_grid > &gc) |
| | Copy constructor. More...
|
| |
|
| template<int... prp> |
| void | ghost_get_local (const openfpm::vector< i_lbox_grid< dim >> &loc_ig_box, const openfpm::vector< e_lbox_grid< dim >> &loc_eg_box, const openfpm::vector< GBoxes< device_grid::dims >> &gdb_ext, openfpm::vector< device_grid > &loc_grid, std::unordered_map< size_t, size_t > &g_id_to_external_ghost_box, const grid_sm< dim, void > &ginfo, bool use_bx_def, size_t opt) |
| | Sync the local ghost part. More...
|
| |
| template<template< typename, typename > class op, int... prp> |
| void | ghost_put_local (const openfpm::vector< i_lbox_grid< dim >> &loc_ig_box, const openfpm::vector< e_lbox_grid< dim >> &loc_eg_box, const openfpm::vector< GBoxes< device_grid::dims >> &gdb_ext, openfpm::vector< device_grid > &loc_grid, openfpm::vector< std::unordered_map< size_t, size_t >> &g_id_to_external_ghost_box) |
| | Sync the local ghost part. More...
|
| |
|
void | send_or_queue (size_t prc, char *pointer, char *pointer2) |
| |
| template<typename prp_object > |
| void | queue_recv_data_get (const openfpm::vector< ep_box_grid< dim >> &eg_box, std::vector< size_t > &prp_recv, ExtPreAlloc< Memory > &prRecv_prp) |
| |
| template<typename prp_object > |
| void | queue_recv_data_put (const openfpm::vector< ip_box_grid< dim >> &ig_box, std::vector< size_t > &prp_recv, ExtPreAlloc< Memory > &prRecv_prp) |
| |
|
template<typename mem , unsigned ... prp> |
| void | unpack_data_to_ext_ghost (ExtPreAlloc< mem > &emem, openfpm::vector< device_grid > &loc_grid, size_t i, const openfpm::vector< ep_box_grid< dim >> &eg_box, const std::unordered_map< size_t, size_t > &g_id_to_external_ghost_box, const openfpm::vector< e_box_multi< dim >> &eb_gid_list, Unpack_stat &ps, size_t opt) |
| |
|
template<typename mem , typename header_type , unsigned ... prp> |
| void | unpack_data_to_ext_ghost_with_header (ExtPreAlloc< mem > &emem, openfpm::vector< device_grid > &loc_grid, header_type &headers, size_t i, const openfpm::vector< ep_box_grid< dim >> &eg_box, const std::unordered_map< size_t, size_t > &g_id_to_external_ghost_box, const openfpm::vector< e_box_multi< dim >> &eb_gid_list, Unpack_stat &ps, size_t opt) |
| |
|
template<unsigned int ... prp> |
| void | fill_headers (size_t opt) |
| |
|
template<unsigned ... prp> |
| void | merge_received_data_get (openfpm::vector< device_grid > &loc_grid, const openfpm::vector< ep_box_grid< dim >> &eg_box, const std::vector< size_t > &prp_recv, ExtPreAlloc< Memory > &prRecv_prp, const std::unordered_map< size_t, size_t > &g_id_to_external_ghost_box, const openfpm::vector< e_box_multi< dim >> &eb_gid_list, size_t opt) |
| |
|
template<template< typename, typename > class op, unsigned ... prp> |
| void | merge_received_data_put (Decomposition &dec, openfpm::vector< device_grid > &loc_grid, const openfpm::vector< ip_box_grid< dim >> &ig_box, const std::vector< size_t > &prp_recv, ExtPreAlloc< Memory > &prRecv_prp, const openfpm::vector< GBoxes< device_grid::dims >> &gdb_ext, const openfpm::vector< std::unordered_map< size_t, size_t >> &g_id_to_internal_ghost_box) |
| |
|
int | find_local_sub (Box< dim, long int > &box_dst, openfpm::vector< GBoxes< device_grid::dims >> &gdb_ext) |
| |
template<unsigned int dim, typename St, typename T, typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
class grid_dist_id_comm< dim, St, T, Decomposition, Memory, device_grid >
This class is an helper for the communication of grid_dist_id.
- Template Parameters
-
| dim | Dimensionality of the grid |
| St | Type of space where the grid is living |
| T | object the grid is storing |
| Decomposition | Class that decompose the grid for example CartDecomposition |
| Memory | Is the allocator |
| device_grid | of base structure is going to store the data |
- See also
- grid_dist_id
Definition at line 141 of file grid_dist_id_comm.hpp.
template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<int... prp>
| void grid_dist_id_comm< dim, St, T, Decomposition, Memory, device_grid >::ghost_get_ |
( |
const openfpm::vector< ip_box_grid< dim >> & |
ig_box, |
|
|
const openfpm::vector< ep_box_grid< dim >> & |
eg_box, |
|
|
const openfpm::vector< i_lbox_grid< dim >> & |
loc_ig_box, |
|
|
const openfpm::vector< e_lbox_grid< dim >> & |
loc_eg_box, |
|
|
const openfpm::vector< GBoxes< device_grid::dims >> & |
gdb_ext, |
|
|
const openfpm::vector< e_box_multi< dim >> & |
eb_gid_list, |
|
|
bool |
use_bx_def, |
|
|
openfpm::vector< device_grid > & |
loc_grid, |
|
|
const grid_sm< dim, void > & |
ginfo, |
|
|
std::unordered_map< size_t, size_t > & |
g_id_to_external_ghost_box, |
|
|
size_t |
opt |
|
) |
| |
|
inline |
It fill the ghost part of the grids.
- Parameters
-
| ig_box | internal ghost box |
| eg_box | external ghost box |
| loc_ig_box | local internal ghost box |
| loc_eg_box | local external ghost box |
| gdb_ext | local grids information |
| loc_grid | set of local grid |
| g_id_to_external_ghost_box | index to external ghost box |
Definition at line 1426 of file grid_dist_id_comm.hpp.
template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<int... prp>
| void grid_dist_id_comm< dim, St, T, Decomposition, Memory, device_grid >::ghost_get_local |
( |
const openfpm::vector< i_lbox_grid< dim >> & |
loc_ig_box, |
|
|
const openfpm::vector< e_lbox_grid< dim >> & |
loc_eg_box, |
|
|
const openfpm::vector< GBoxes< device_grid::dims >> & |
gdb_ext, |
|
|
openfpm::vector< device_grid > & |
loc_grid, |
|
|
std::unordered_map< size_t, size_t > & |
g_id_to_external_ghost_box, |
|
|
const grid_sm< dim, void > & |
ginfo, |
|
|
bool |
use_bx_def, |
|
|
size_t |
opt |
|
) |
| |
|
inlineprivate |
Sync the local ghost part.
- Template Parameters
-
- Parameters
-
| loc_ig_box | local internel ghost boxes |
| loc_eg_box | local external ghost boxes |
| gdb_ext | information about the local grids |
| loc_grid | local grids |
| g_id_to_external_ghost_box | from global index to external ghost box |
For all the sub-domains
For all the internal ghost boxes of each sub-domain
Definition at line 218 of file grid_dist_id_comm.hpp.
template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<template< typename, typename > class op, int... prp>
| void grid_dist_id_comm< dim, St, T, Decomposition, Memory, device_grid >::ghost_put_ |
( |
Decomposition & |
dec, |
|
|
const openfpm::vector< ip_box_grid< dim >> & |
ig_box, |
|
|
const openfpm::vector< ep_box_grid< dim >> & |
eg_box, |
|
|
const openfpm::vector< i_lbox_grid< dim >> & |
loc_ig_box, |
|
|
const openfpm::vector< e_lbox_grid< dim >> & |
loc_eg_box, |
|
|
const openfpm::vector< GBoxes< device_grid::dims >> & |
gdb_ext, |
|
|
openfpm::vector< device_grid > & |
loc_grid, |
|
|
openfpm::vector< std::unordered_map< size_t, size_t >> & |
g_id_to_internal_ghost_box |
|
) |
| |
|
inline |
It merge the information in the ghost with the real information.
- Template Parameters
-
- Parameters
-
| ig_box | internal ghost box |
| eg_box | external ghost box |
| loc_ig_box | local internal ghost box |
| loc_eg_box | local external ghost box |
| gdb_ext | local grids information |
| loc_grid | set of local grid |
| g_id_to_internal_ghost_box | index to internal ghost box |
Definition at line 1676 of file grid_dist_id_comm.hpp.
template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<template< typename, typename > class op, int... prp>
| void grid_dist_id_comm< dim, St, T, Decomposition, Memory, device_grid >::ghost_put_local |
( |
const openfpm::vector< i_lbox_grid< dim >> & |
loc_ig_box, |
|
|
const openfpm::vector< e_lbox_grid< dim >> & |
loc_eg_box, |
|
|
const openfpm::vector< GBoxes< device_grid::dims >> & |
gdb_ext, |
|
|
openfpm::vector< device_grid > & |
loc_grid, |
|
|
openfpm::vector< std::unordered_map< size_t, size_t >> & |
g_id_to_external_ghost_box |
|
) |
| |
|
inlineprivate |
Sync the local ghost part.
- Template Parameters
-
- Parameters
-
| loc_ig_box | local internel ghost boxes |
| loc_eg_box | local external ghost boxes |
| gdb_ext | information about the local grids |
| loc_grid | local grids |
| g_id_to_external_ghost_box | global-if to external ghost box |
For all the sub-domains
For all the external ghost boxes of each sub-domain
Definition at line 318 of file grid_dist_id_comm.hpp.
template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<typename lambda_t >
| void grid_dist_id_comm< dim, St, T, Decomposition, Memory, device_grid >::labelIntersectionGridsProcessor_and_pack |
( |
Decomposition & |
dec, |
|
|
CellDecomposer_sm< dim, St, shift< dim, St >> & |
cd_sm, |
|
|
openfpm::vector< device_grid > & |
loc_grid_old, |
|
|
openfpm::vector< GBoxes< device_grid::dims >> & |
gdb_ext, |
|
|
openfpm::vector< GBoxes< device_grid::dims >> & |
gdb_ext_old, |
|
|
openfpm::vector< GBoxes< device_grid::dims >> & |
gdb_ext_global, |
|
|
size_t |
p_id_cur, |
|
|
lambda_t |
f |
|
) |
| |
|
inline |
Label intersection grids for mappings.
- Parameters
-
| dec | Decomposition |
| loc_grid_old | old local grids |
| cd_sm | Cell-decomposer |
| gdb_ext | information of the local grids |
| gdb_ext_old | information of the old local grids |
| gdb_ext_global | information of the grids globaly |
| lbl_b | label for each grid |
| prc_sz | For each processor the number of grids to send to |
Definition at line 1067 of file grid_dist_id_comm.hpp.
template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<int ... prp>
| void grid_dist_id_comm< dim, St, T, Decomposition, Memory, device_grid >::map_ |
( |
Decomposition & |
dec, |
|
|
CellDecomposer_sm< dim, St, shift< dim, St >> & |
cd_sm, |
|
|
openfpm::vector< device_grid > & |
loc_grid, |
|
|
openfpm::vector< device_grid > & |
loc_grid_old, |
|
|
openfpm::vector< GBoxes< device_grid::dims >> & |
gdb_ext, |
|
|
openfpm::vector< GBoxes< device_grid::dims >> & |
gdb_ext_old, |
|
|
openfpm::vector< GBoxes< device_grid::dims >> & |
gdb_ext_global, |
|
|
size_t |
opt |
|
) |
| |
|
inline |
Moves all the grids that does not belong to the local processor to the respective processor.
This function in general is called if the decomposition change
- Parameters
-
| dec | Decomposition |
| cd_sm | cell-decomposer |
| loc_grid | set of local grids |
| loc_grid_old | set of old local grids |
| gdb_ext | information of the local grids |
| gdb_ext_old | information of the old local grids |
| gdb_ext_global | it contain the decomposition at global level |
Definition at line 1281 of file grid_dist_id_comm.hpp.
template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<typename prp_object >
Receive the information from each processors
Resize the receiving buffer
Definition at line 419 of file grid_dist_id_comm.hpp.
template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
template<typename prp_object >
template<unsigned int dim, typename St , typename T , typename Decomposition = CartDecomposition<dim,St>, typename Memory = HeapMemory, typename device_grid = grid_cpu<dim,T>>
For each near processor, outgoing intersection grid
- Warning
- m_oGrid is assumed to be an ordered list first id is grid second id is the processor id
Definition at line 186 of file grid_dist_id_comm.hpp.