Gather-scatter.
|
| subroutine | gs_init (gs, dofmap, bcknd, comm_bcknd) |
| | The runtime autotuning of the comm. backend, implemented in the gs_tune submodule: everything the selection needs (the candidate list, the NEKO_GS_TUNE parsing, switching a live gs over to another backend) is private to it, and only what gs_init drives is declared here.
|
| |
| subroutine, public | gs_comm_alloc (comm, comm_bcknd) |
| | Allocate a gather-scatter comm. backend of type comm_bcknd.
|
| |
| character(len=12) function, public | gs_comm_name (comm_bcknd) |
| | Name of the gather-scatter comm. backend comm_bcknd, right-adjusted for the log.
|
| |
| logical function, public | gs_comm_on_device (comm_bcknd) |
| | Whether the comm. backend comm_bcknd exchanges the shared dofs straight out of device memory rather than out of the host mirror of the shared buffer, which is what decides where the gather-scatter backend leaves them (gs_bcknd_tshared_on_host). A host backend on a device build is not device-resident: it drives the exchange from the mirror, at the price of a copy in each direction.
|
| |
| subroutine | gs_free (gs) |
| | Deallocate a gather-scatter kernel.
|
| |
| subroutine | gs_vec_alloc (gs) |
| | Allocate the buffers the fused vector gather-scatter needs, on the first gs_op_r3 that reaches the fused path.
|
| |
| subroutine | gs_init_mapping (gs) |
| | Setup mapping of dofs to gather-scatter operations.
|
| |
| subroutine | gs_schedule (gs) |
| | Schedule shared gather-scatter operations.
|
| |
| subroutine | 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 | gs_op_fld (gs, u, op, event) |
| | Gather-scatter operation on a field u with op op.
|
| |
| subroutine | gs_op_r4 (gs, u, n, op, event) |
| | Gather-scatter operation on a rank 4 array.
|
| |
| subroutine | gs_op_vector (gs, u, n, op, event) |
| | Gather-scatter operation on a vector u with op op.
|
| |
| subroutine | 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 | 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 | 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.
|
| |