Compadre
1.5.9
|
NeighborLists assists in accessing entries of compressed row neighborhood lists. More...
NeighborLists assists in accessing entries of compressed row neighborhood lists.
Definition at line 19 of file Compadre_NeighborLists.hpp.
#include <Compadre_NeighborLists.hpp>
Public Types | |
typedef view_type | internal_view_type |
typedef Kokkos::View < global_index_type *, typename view_type::array_layout, typename view_type::memory_space, typename view_type::memory_traits > | internal_row_offsets_view_type |
Public Member Functions | |
Constructors | |
Ways to initialize a NeighborLists object | |
NeighborLists () | |
Constructor for the purpose of classes who have NeighborLists as a member object. More... | |
NeighborLists (view_type cr_neighbor_lists, view_type number_of_neighbors_list, internal_row_offsets_view_type neighbor_lists_row_offsets, bool compute_max=true) | |
Constructor for when compressed row cr_neighbor_lists is preallocated/populated, number_of_neighbors_list and neighbor_lists_row_offsets have already been populated. More... | |
NeighborLists (view_type cr_neighbor_lists, view_type number_of_neighbors_list) | |
Constructor for when compressed row cr_neighbor_lists is preallocated/populated, and number_of_neighbors_list is already populated, and row offsets still need to be computed. More... | |
NeighborLists (view_type number_of_neighbors_list) | |
Constructor for when number_of_neighbors_list is already populated. Will allocate space for compressed row neighbor lists data, and will allocate then populate information for row offsets. More... | |
Public modifiers | |
KOKKOS_INLINE_FUNCTION void | setNeighborDevice (int target_index, int neighbor_num, int new_value) |
Setter function for N(i,j) indexing where N(i,j) is the index of the jth neighbor of i. More... | |
void | computeMaxNumNeighbors () |
Calculate the maximum number of neighbors of all targets' neighborhoods (host) More... | |
void | computeMinNumNeighbors () |
Calculate the minimum number of neighbors of all targets' neighborhoods (host) More... | |
void | computeRowOffsets () |
Calculate the row offsets for each target's neighborhood (host) More... | |
void | copyDeviceDataToHost () |
Sync the host from the device (copy device data to host) More... | |
view_type | getNeighborLists () const |
Device view into neighbor lists data (use with caution) More... | |
view_type | getNumberOfNeighborsList () const |
Device view into number of neighbors list (use with caution) More... | |
Public accessors | |
KOKKOS_INLINE_FUNCTION int | getNumberOfTargets () const |
Get number of total targets having neighborhoods (host/device). More... | |
int | getNumberOfNeighborsHost (int target_index) const |
Get number of neighbors for a given target (host) More... | |
KOKKOS_INLINE_FUNCTION int | getNumberOfNeighborsDevice (int target_index) const |
Get number of neighbors for a given target (device) More... | |
global_index_type | getRowOffsetHost (int target_index) const |
Get offset into compressed row neighbor lists (host) More... | |
KOKKOS_INLINE_FUNCTION global_index_type | getRowOffsetDevice (int target_index) const |
Get offset into compressed row neighbor lists (device) More... | |
int | getNeighborHost (int target_index, int neighbor_num) const |
Offers N(i,j) indexing where N(i,j) is the index of the jth neighbor of i (host) More... | |
KOKKOS_INLINE_FUNCTION int | getNeighborDevice (int target_index, int neighbor_num) const |
Offers N(i,j) indexing where N(i,j) is the index of the jth neighbor of i (device) More... | |
KOKKOS_INLINE_FUNCTION int | getMaxNumNeighbors () const |
Get the maximum number of neighbors of all targets' neighborhoods (host/device) More... | |
KOKKOS_INLINE_FUNCTION int | getMinNumNeighbors () const |
Get the minimum number of neighbors of all targets' neighborhoods (host/device) More... | |
global_index_type | getTotalNeighborsOverAllListsHost () const |
Get the sum of the number of neighbors of all targets' neighborhoods (host) More... | |
KOKKOS_INLINE_FUNCTION global_index_type | getTotalNeighborsOverAllListsDevice () const |
Get the sum of the number of neighbors of all targets' neighborhoods (device) More... | |
Public Attributes | |
int | _max_neighbor_list_row_storage_size |
int | _min_neighbor_list_row_storage_size |
bool | _needs_sync_to_host |
int | _number_of_targets |
internal_row_offsets_view_type | _row_offsets |
view_type | _cr_neighbor_lists |
view_type | _number_of_neighbors_list |
internal_row_offsets_view_type::HostMirror | _host_row_offsets |
view_type::HostMirror | _host_cr_neighbor_lists |
view_type::HostMirror | _host_number_of_neighbors_list |
typedef Kokkos::View<global_index_type*, typename view_type::array_layout, typename view_type::memory_space, typename view_type::memory_traits> Compadre::NeighborLists< view_type >::internal_row_offsets_view_type |
Definition at line 23 of file Compadre_NeighborLists.hpp.
typedef view_type Compadre::NeighborLists< view_type >::internal_view_type |
Definition at line 21 of file Compadre_NeighborLists.hpp.
|
inline |
Constructor for the purpose of classes who have NeighborLists as a member object.
Definition at line 44 of file Compadre_NeighborLists.hpp.
|
inline |
Constructor for when compressed row cr_neighbor_lists
is preallocated/populated, number_of_neighbors_list
and neighbor_lists_row_offsets
have already been populated.
Definition at line 54 of file Compadre_NeighborLists.hpp.
|
inline |
Constructor for when compressed row cr_neighbor_lists
is preallocated/populated, and number_of_neighbors_list
is already populated, and row offsets still need to be computed.
Definition at line 90 of file Compadre_NeighborLists.hpp.
|
inline |
Constructor for when number_of_neighbors_list
is already populated. Will allocate space for compressed row neighbor lists data, and will allocate then populate information for row offsets.
Definition at line 123 of file Compadre_NeighborLists.hpp.
|
inline |
Calculate the maximum number of neighbors of all targets' neighborhoods (host)
Definition at line 165 of file Compadre_NeighborLists.hpp.
|
inline |
Calculate the minimum number of neighbors of all targets' neighborhoods (host)
Definition at line 180 of file Compadre_NeighborLists.hpp.
|
inline |
Calculate the row offsets for each target's neighborhood (host)
Definition at line 195 of file Compadre_NeighborLists.hpp.
|
inline |
Sync the host from the device (copy device data to host)
Definition at line 209 of file Compadre_NeighborLists.hpp.
|
inline |
Get the maximum number of neighbors of all targets' neighborhoods (host/device)
Definition at line 282 of file Compadre_NeighborLists.hpp.
|
inline |
Get the minimum number of neighbors of all targets' neighborhoods (host/device)
Definition at line 289 of file Compadre_NeighborLists.hpp.
|
inline |
Offers N(i,j) indexing where N(i,j) is the index of the jth neighbor of i (device)
Definition at line 273 of file Compadre_NeighborLists.hpp.
|
inline |
Offers N(i,j) indexing where N(i,j) is the index of the jth neighbor of i (host)
Definition at line 262 of file Compadre_NeighborLists.hpp.
|
inline |
Device view into neighbor lists data (use with caution)
Definition at line 216 of file Compadre_NeighborLists.hpp.
|
inline |
Get number of neighbors for a given target (device)
Definition at line 243 of file Compadre_NeighborLists.hpp.
|
inline |
Get number of neighbors for a given target (host)
Definition at line 236 of file Compadre_NeighborLists.hpp.
|
inline |
Device view into number of neighbors list (use with caution)
Definition at line 221 of file Compadre_NeighborLists.hpp.
|
inline |
Get number of total targets having neighborhoods (host/device).
Definition at line 231 of file Compadre_NeighborLists.hpp.
|
inline |
Get offset into compressed row neighbor lists (device)
Definition at line 256 of file Compadre_NeighborLists.hpp.
|
inline |
Get offset into compressed row neighbor lists (host)
Definition at line 249 of file Compadre_NeighborLists.hpp.
|
inline |
Get the sum of the number of neighbors of all targets' neighborhoods (device)
Definition at line 305 of file Compadre_NeighborLists.hpp.
|
inline |
Get the sum of the number of neighbors of all targets' neighborhoods (host)
Definition at line 295 of file Compadre_NeighborLists.hpp.
|
inline |
Setter function for N(i,j) indexing where N(i,j) is the index of the jth neighbor of i.
Definition at line 157 of file Compadre_NeighborLists.hpp.
view_type Compadre::NeighborLists< view_type >::_cr_neighbor_lists |
Definition at line 31 of file Compadre_NeighborLists.hpp.
view_type::HostMirror Compadre::NeighborLists< view_type >::_host_cr_neighbor_lists |
Definition at line 35 of file Compadre_NeighborLists.hpp.
view_type::HostMirror Compadre::NeighborLists< view_type >::_host_number_of_neighbors_list |
Definition at line 36 of file Compadre_NeighborLists.hpp.
internal_row_offsets_view_type::HostMirror Compadre::NeighborLists< view_type >::_host_row_offsets |
Definition at line 34 of file Compadre_NeighborLists.hpp.
int Compadre::NeighborLists< view_type >::_max_neighbor_list_row_storage_size |
Definition at line 25 of file Compadre_NeighborLists.hpp.
int Compadre::NeighborLists< view_type >::_min_neighbor_list_row_storage_size |
Definition at line 26 of file Compadre_NeighborLists.hpp.
bool Compadre::NeighborLists< view_type >::_needs_sync_to_host |
Definition at line 27 of file Compadre_NeighborLists.hpp.
view_type Compadre::NeighborLists< view_type >::_number_of_neighbors_list |
Definition at line 32 of file Compadre_NeighborLists.hpp.
int Compadre::NeighborLists< view_type >::_number_of_targets |
Definition at line 28 of file Compadre_NeighborLists.hpp.
internal_row_offsets_view_type Compadre::NeighborLists< view_type >::_row_offsets |
Definition at line 30 of file Compadre_NeighborLists.hpp.