This class is an helper for the communication of grid_dist_id. More...
This class is an helper for the communication of grid_dist_id.
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 |
Definition at line 141 of file grid_dist_id_comm.hpp.
#include <grid_dist_id_comm.hpp>
Data Structures | |
struct | rp_id |
Public Member Functions | |
void | grids_reconstruct (openfpm::vector< openfpm::vector< aggregate< device_grid, SpaceBox< 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. | |
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. | |
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. | |
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. | |
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. | |
grid_dist_id_comm () | |
Constructor. | |
grid_dist_id_comm (const grid_dist_id_comm< dim, St, T, Decomposition, Memory, device_grid > &gc) | |
Copy constructor. | |
Private Member Functions | |
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. | |
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. | |
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) |
Static Private Member Functions | |
static void * | receive_dynamic (size_t msg_i, size_t total_msg, size_t total_p, size_t i, size_t ri, size_t tag, void *ptr) |
Private Attributes | |
Vcluster< Memory > & | v_cl |
VCluster. | |
openfpm::vector< size_t > | p_map_req |
Maps the processor id with the communication request into map procedure. | |
openfpm::vector< size_t > | prc_recv_map |
Stores the list of processors that communicate with us (local processor) | |
openfpm::vector< size_t > | recv_sz_map |
Stores the size of the elements added for each processor that communicate with us (local processor) | |
openfpm::vector< size_t > | send_prc_queue |
List of processor to send to. | |
openfpm::vector< void * > | send_pointer |
Pointer to the memory to send. | |
openfpm::vector< size_t > | send_size |
size to send | |
openfpm::vector_fr< BMemory< Memory > > | recv_buffers |
receiving buffers in case of dynamic | |
openfpm::vector< rp_id > | recv_proc |
receiving processors | |
openfpm::vector< openfpm::vector< aggregate< device_grid, SpaceBox< dim, long int > > > > | m_oGrid |
openfpm::vector< int > | m_oGrid_c |
Memory | g_send_prp_mem |
Memory for the ghost sending buffer. | |
Memory | g_recv_prp_mem |
Memory for the ghost receiving buffer. | |
openfpm::vector< void * > | pointers |
send pointers | |
openfpm::vector< void * > | pointers2 |
openfpm::vector_gpu< aggregate< void *, void *, int > > | pointers_h |
header unpacker info | |
int | n_headers_slot = 1 |
openfpm::vector_gpu< aggregate< size_t, size_t, unsigned int > > | headers |
size_t | opt |
Receiving option. | |
|
inline |
Constructor.
Definition at line 1797 of file grid_dist_id_comm.hpp.
|
inline |
Copy constructor.
It does not really copy. This structure it suppose to store only temporal data
Definition at line 1809 of file grid_dist_id_comm.hpp.
|
inlineprivate |
Definition at line 707 of file grid_dist_id_comm.hpp.
|
inlineprivate |
Definition at line 944 of file grid_dist_id_comm.hpp.
|
inline |
It fill the ghost part of the grids.
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.
|
inlineprivate |
Sync the local ghost part.
prp... | properties to sync |
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.
|
inline |
It merge the information in the ghost with the real information.
op | merge operation |
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.
|
inlineprivate |
Sync the local ghost part.
prp... | properties to sync |
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.
|
inline |
Reconstruct the local grids.
m_oGrid_recv | Vector of labeled grids to combine into a local grid |
loc_grid | local grids |
gdb_ext | information of the local grids |
cd_sm | Cell-decomposer |
Definition at line 974 of file grid_dist_id_comm.hpp.
|
inline |
Label intersection grids for mappings.
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.
|
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
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.
|
inlineprivate |
Definition at line 749 of file grid_dist_id_comm.hpp.
|
inlineprivate |
Definition at line 836 of file grid_dist_id_comm.hpp.
|
inlineprivate |
Receive the information from each processors
Resize the receiving buffer
Definition at line 419 of file grid_dist_id_comm.hpp.
|
inlineprivate |
Resize the receiving buffer
Definition at line 489 of file grid_dist_id_comm.hpp.
|
inlinestaticprivate |
Definition at line 390 of file grid_dist_id_comm.hpp.
|
inlineprivate |
Definition at line 378 of file grid_dist_id_comm.hpp.
|
inline |
Unpack.
Definition at line 1231 of file grid_dist_id_comm.hpp.
|
inlineprivate |
Definition at line 545 of file grid_dist_id_comm.hpp.
|
inlineprivate |
Definition at line 622 of file grid_dist_id_comm.hpp.
|
private |
Memory for the ghost receiving buffer.
Definition at line 193 of file grid_dist_id_comm.hpp.
|
private |
Memory for the ghost sending buffer.
Definition at line 190 of file grid_dist_id_comm.hpp.
|
private |
Definition at line 202 of file grid_dist_id_comm.hpp.
|
private |
For each near processor, outgoing intersection grid
Definition at line 186 of file grid_dist_id_comm.hpp.
|
private |
Definition at line 187 of file grid_dist_id_comm.hpp.
|
private |
Definition at line 201 of file grid_dist_id_comm.hpp.
|
private |
Receiving option.
Definition at line 205 of file grid_dist_id_comm.hpp.
|
private |
Maps the processor id with the communication request into map procedure.
Definition at line 147 of file grid_dist_id_comm.hpp.
|
private |
send pointers
Definition at line 196 of file grid_dist_id_comm.hpp.
|
private |
Definition at line 197 of file grid_dist_id_comm.hpp.
|
private |
header unpacker info
Definition at line 200 of file grid_dist_id_comm.hpp.
|
private |
Stores the list of processors that communicate with us (local processor)
Definition at line 150 of file grid_dist_id_comm.hpp.
|
private |
receiving buffers in case of dynamic
Definition at line 165 of file grid_dist_id_comm.hpp.
|
private |
receiving processors
Definition at line 180 of file grid_dist_id_comm.hpp.
|
private |
Stores the size of the elements added for each processor that communicate with us (local processor)
Definition at line 153 of file grid_dist_id_comm.hpp.
|
private |
Pointer to the memory to send.
Definition at line 159 of file grid_dist_id_comm.hpp.
|
private |
List of processor to send to.
Definition at line 156 of file grid_dist_id_comm.hpp.
|
private |
size to send
Definition at line 162 of file grid_dist_id_comm.hpp.
|
private |
VCluster.
Definition at line 144 of file grid_dist_id_comm.hpp.