Neko 1.99.5
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
gather_scatter.f90 File Reference

Go to the source code of this file.

Data Types

type  gather_scatter::gs_t
 

Modules

module  gather_scatter
 Gather-scatter.
 

Functions/Subroutines

subroutine gather_scatter::gs_init (gs, dofmap, bcknd, comm_bcknd)
 Initialize a gather-scatter kernel.
 
subroutine gather_scatter::gs_free (gs)
 Deallocate a gather-scatter kernel.
 
subroutine gather_scatter::gs_init_mapping (gs)
 Setup mapping of dofs to gather-scatter operations.
 
integer function gs_mapping_add_dof (map_, dof, max_id)
 Register a unique dof Takes the unique id dof and checks if it is in the htable map_ If it is we return the gather-scatter id this global dof has been assigned to. This is done as the global id can be very large max(integer8), but the number of local points is at most max(integer4)
 
recursive subroutine gs_qsort_dofmap (dg, gd, n, lo, hi)
 Sort the dof lists based on the dof to gather-scatter list.
 
subroutine gs_find_blks (dg, blk_len, blk_off, nblks, n, m)
 Find blocks sharing dofs in non-facet data.
 
subroutine gather_scatter::gs_schedule (gs)
 Schedule shared gather-scatter operations.
 
subroutine gather_scatter::gs_sort_i8 (a, ind, n)
 Heap sort for 64-bit integer arrays, returning the permutation ind. Local helper for gs_schedule (the generic math sort has no i8 variant).
 
subroutine gather_scatter::gs_op_fld (gs, u, op, event)
 Gather-scatter operation on a field u with op op.
 
subroutine gather_scatter::gs_op_r4 (gs, u, n, op, event)
 Gather-scatter operation on a rank 4 array.
 
subroutine gather_scatter::gs_op_vector (gs, u, n, op, event)
 Gather-scatter operation on a vector u with op op.
 
subroutine gather_scatter::gs_op_r3 (gs, u1, u2, u3, n, op, event)
 Gather-scatter operation on a 3-component vector of rank-4 arrays (u1, u2, u3) with op op; see gs_op_vector3.
 
subroutine gather_scatter::gs_op_vector3 (gs, u1, u2, u3, n, op, event)
 Gather-scatter operation on a 3-component vector (u1, u2, u3) with op op. When the comm backend supports a fused vector halo exchange, the three components are communicated in a single round; otherwise this falls back to three independent scalar gs_op_vector calls (identical result, 3 rounds). The on-node gather/scatter is always done per component (scalar), so only the communication cost is reduced. On device backends the caller's event is recorded once, after the last component's scatter (or superseded by hard synchronisation on host-mirrored comms), so a single event sync covers all components.
 
subroutine gather_scatter::gs_op_r3_device (gs, u1, u2, u3, n, op, nc, lo, so, m, l, tid, scatter_event)
 Device path for the fused 3-component gs. The device backend's shared gather/scatter always operate on its internal shared buffer, so each component is staged between that buffer and its column of the compact vector buffer gsshared_gs_v: through the host mirror when the comm backend is a host backend (shared_on_host, e.g. OpenCL/Metal or a device build with host MPI), or with device-to-device copies when the comm is device-resident (device MPI/NCCL/NVSHMEM). Apart from the column staging the two modes are identical; the comm backends transparently pick the host array or its device pointer, as in gs_op_vector.
 

Function/Subroutine Documentation

◆ gs_find_blks()

subroutine gs_init_mapping::gs_find_blks ( integer, dimension(n), intent(inout dg,
integer, dimension(:), intent(inout), allocatable  blk_len,
integer, dimension(:), intent(inout), allocatable  blk_off,
integer, intent(inout nblks,
integer, intent(in n,
integer, intent(in m 
)
private

Definition at line 1294 of file gather_scatter.f90.

Here is the caller graph for this function:

◆ gs_mapping_add_dof()

integer function gs_init_mapping::gs_mapping_add_dof ( type(htable_i8_t), intent(inout map_,
integer(kind=i8), intent(inout dof,
integer, intent(inout max_id 
)
private
Parameters
map_,htableof global unique id to local unique id
dof,globalunique id of dof
max_id,currentnumber of entries in map_

Definition at line 1237 of file gather_scatter.f90.

Here is the caller graph for this function:

◆ gs_qsort_dofmap()

recursive subroutine gs_init_mapping::gs_qsort_dofmap ( integer, dimension(n), intent(inout dg,
integer, dimension(n), intent(inout gd,
integer, intent(inout n,
integer  lo,
integer  hi 
)
private

Definition at line 1252 of file gather_scatter.f90.

Here is the call graph for this function:
Here is the caller graph for this function: