Neko 1.99.5
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
gather_scatter::gs_t Type Reference
Collaboration diagram for gather_scatter::gs_t:

Public Member Functions

procedure, pass(gs) gs_op_vector (gs, u, n, op, event)
 Gather-scatter operation on a vector u with op op.
 
procedure, pass(gs) 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.
 
procedure, pass(gs) 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.
 
procedure, pass(gs) init (gs, dofmap, bcknd, comm_bcknd)
 Initialize a gather-scatter kernel.
 
procedure, pass(gs) free (gs)
 Deallocate a gather-scatter kernel.
 
generic op (gs, u, op, event)
 Gather-scatter operation on a field u with op op.
 
generic op (gs, u, n, op, event)
 Gather-scatter operation on a rank 4 array.
 
generic op (gs, u, n, op, event)
 Gather-scatter operation on a vector u with op op.
 
generic op (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.
 
generic op (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.
 

Public Attributes

real(kind=rp), dimension(:), allocatable local_gs
 Buffer for local gs-ops.
 
integer, dimension(:), allocatable local_dof_gs
 Local dof to gs mapping.
 
integer, dimension(:), allocatable local_gs_dof
 Local gs to dof mapping.
 
integer, dimension(:), allocatable local_blk_len
 Local non-facet blocks.
 
integer, dimension(:), allocatable local_blk_off
 Local non-facet blocks offset.
 
real(kind=rp), dimension(:), allocatable shared_gs
 Buffer for shared gs-op.
 
real(kind=rp), dimension(:), allocatable shared_gs_v
 Compact multi-component shared buffer for the fused vector gs (gs_op_r3), sized GS_VEC_NC*nshared, component-outer. On device it is device-mapped and the fused exchange operates on its device pointer.
 
type(c_ptr) shared_gs_v_d = C_NULL_PTR
 Dev. ptr for shared_gs_v.
 
integer, dimension(:), allocatable shared_dof_gs
 Shared dof to gs map.
 
integer, dimension(:), allocatable shared_gs_dof
 Shared gs to dof map.
 
integer, dimension(:), allocatable shared_blk_len
 Shared non-facet blocks.
 
integer, dimension(:), allocatable shared_blk_off
 Shared non-facet blocks offset.
 
type(dofmap_t), pointer dofmap
 Dofmap for gs-ops.
 
type(htable_i8_tshared_dofs
 Htable of shared dofs.
 
integer nlocal
 Local gs-ops.
 
integer nshared
 Shared gs-ops.
 
integer nlocal_blks
 Number of local blks.
 
integer nshared_blks
 Number of shared blks.
 
integer local_facet_offset
 offset for loc. facets
 
integer shared_facet_offset
 offset for shr. facets
 
class(gs_bcknd_t), allocatable bcknd
 Gather-scatter backend.
 
class(gs_comm_t), allocatable comm
 Comm. method.
 

Private Member Functions

procedure, pass(gs), private gs_op_fld (gs, u, op, event)
 Gather-scatter operation on a field u with op op.
 
procedure, pass(gs), private gs_op_r4 (gs, u, n, op, event)
 Gather-scatter operation on a rank 4 array.
 

Detailed Description

Definition at line 76 of file gather_scatter.f90.

Member Function/Subroutine Documentation

◆ free()

procedure, pass(gs) gather_scatter::gs_t::free ( class(gs_t), intent(inout gs)

Definition at line 109 of file gather_scatter.f90.

◆ gs_op_fld()

procedure, pass(gs), private gather_scatter::gs_t::gs_op_fld ( class(gs_t), intent(inout gs,
type(field_t), intent(inout u,
integer  op,
type(c_ptr), intent(inout), optional  event 
)
private

Definition at line 103 of file gather_scatter.f90.

◆ gs_op_r3()

procedure, pass(gs) gather_scatter::gs_t::gs_op_r3 ( class(gs_t), intent(inout gs,
real(kind=rp), dimension(:,:,:,:), intent(inout), contiguous  u1,
real(kind=rp), dimension(:,:,:,:), intent(inout), contiguous  u2,
real(kind=rp), dimension(:,:,:,:), intent(inout), contiguous  u3,
integer, intent(in n,
integer  op,
type(c_ptr), intent(inout), optional  event 
)

Definition at line 106 of file gather_scatter.f90.

◆ gs_op_r4()

procedure, pass(gs), private gather_scatter::gs_t::gs_op_r4 ( class(gs_t), intent(inout gs,
real(kind=rp), dimension(:,:,:,:), intent(inout), contiguous  u,
integer, intent(in n,
integer  op,
type(c_ptr), intent(inout), optional  event 
)
private

Definition at line 104 of file gather_scatter.f90.

◆ gs_op_vector()

procedure, pass(gs) gather_scatter::gs_t::gs_op_vector ( class(gs_t), intent(inout gs,
real(kind=rp), dimension(n), intent(inout u,
integer, intent(in n,
integer  op,
type(c_ptr), intent(inout), optional  event 
)

Definition at line 105 of file gather_scatter.f90.

◆ gs_op_vector3()

procedure, pass(gs) gather_scatter::gs_t::gs_op_vector3 ( class(gs_t), intent(inout gs,
real(kind=rp), dimension(n), intent(inout u1,
real(kind=rp), dimension(n), intent(inout u2,
real(kind=rp), dimension(n), intent(inout u3,
integer, intent(in n,
integer  op,
type(c_ptr), intent(inout), optional  event 
)

Definition at line 107 of file gather_scatter.f90.

◆ init()

procedure, pass(gs) gather_scatter::gs_t::init ( class(gs_t), intent(inout gs,
type(dofmap_t), intent(inout), target  dofmap,
integer, optional  bcknd,
integer, optional  comm_bcknd 
)
Parameters
dofmap,globalnumbering of points and connectivity to base gs on
bcknd,backendfor executing the gs_ops
comm_bcknd,backendfor excuting the communication with

Definition at line 108 of file gather_scatter.f90.

◆ op() [1/5]

generic gather_scatter::gs_t::op ( class(gs_t), intent(inout gs,
real(kind=rp), dimension(:,:,:,:), intent(inout), contiguous  u,
integer, intent(in n,
integer  op,
type(c_ptr), intent(inout), optional  event 
)

Definition at line 110 of file gather_scatter.f90.

◆ op() [2/5]

generic gather_scatter::gs_t::op ( class(gs_t), intent(inout gs,
real(kind=rp), dimension(n), intent(inout u,
integer, intent(in n,
integer  op,
type(c_ptr), intent(inout), optional  event 
)

Definition at line 110 of file gather_scatter.f90.

◆ op() [3/5]

generic gather_scatter::gs_t::op ( class(gs_t), intent(inout gs,
type(field_t), intent(inout u,
integer  op,
type(c_ptr), intent(inout), optional  event 
)

Definition at line 110 of file gather_scatter.f90.

Here is the call graph for this function:

◆ op() [4/5]

generic gather_scatter::gs_t::op ( class(gs_t), intent(inout gs,
real(kind=rp), dimension(:,:,:,:), intent(inout), contiguous  u1,
real(kind=rp), dimension(:,:,:,:), intent(inout), contiguous  u2,
real(kind=rp), dimension(:,:,:,:), intent(inout), contiguous  u3,
integer, intent(in n,
integer  op,
type(c_ptr), intent(inout), optional  event 
)

Definition at line 110 of file gather_scatter.f90.

◆ op() [5/5]

generic gather_scatter::gs_t::op ( class(gs_t), intent(inout gs,
real(kind=rp), dimension(n), intent(inout u1,
real(kind=rp), dimension(n), intent(inout u2,
real(kind=rp), dimension(n), intent(inout u3,
integer, intent(in n,
integer  op,
type(c_ptr), intent(inout), optional  event 
)

Definition at line 110 of file gather_scatter.f90.

Member Data Documentation

◆ bcknd

class(gs_bcknd_t), allocatable gather_scatter::gs_t::bcknd

Definition at line 100 of file gather_scatter.f90.

◆ comm

class(gs_comm_t), allocatable gather_scatter::gs_t::comm

Definition at line 101 of file gather_scatter.f90.

◆ dofmap

type(dofmap_t), pointer gather_scatter::gs_t::dofmap

Definition at line 92 of file gather_scatter.f90.

◆ local_blk_len

integer, dimension(:), allocatable gather_scatter::gs_t::local_blk_len

Definition at line 80 of file gather_scatter.f90.

◆ local_blk_off

integer, dimension(:), allocatable gather_scatter::gs_t::local_blk_off

Definition at line 81 of file gather_scatter.f90.

◆ local_dof_gs

integer, dimension(:), allocatable gather_scatter::gs_t::local_dof_gs

Definition at line 78 of file gather_scatter.f90.

◆ local_facet_offset

integer gather_scatter::gs_t::local_facet_offset

Definition at line 98 of file gather_scatter.f90.

◆ local_gs

real(kind=rp), dimension(:), allocatable gather_scatter::gs_t::local_gs

Definition at line 77 of file gather_scatter.f90.

◆ local_gs_dof

integer, dimension(:), allocatable gather_scatter::gs_t::local_gs_dof

Definition at line 79 of file gather_scatter.f90.

◆ nlocal

integer gather_scatter::gs_t::nlocal

Definition at line 94 of file gather_scatter.f90.

◆ nlocal_blks

integer gather_scatter::gs_t::nlocal_blks

Definition at line 96 of file gather_scatter.f90.

◆ nshared

integer gather_scatter::gs_t::nshared

Definition at line 95 of file gather_scatter.f90.

◆ nshared_blks

integer gather_scatter::gs_t::nshared_blks

Definition at line 97 of file gather_scatter.f90.

◆ shared_blk_len

integer, dimension(:), allocatable gather_scatter::gs_t::shared_blk_len

Definition at line 90 of file gather_scatter.f90.

◆ shared_blk_off

integer, dimension(:), allocatable gather_scatter::gs_t::shared_blk_off

Definition at line 91 of file gather_scatter.f90.

◆ shared_dof_gs

integer, dimension(:), allocatable gather_scatter::gs_t::shared_dof_gs

Definition at line 88 of file gather_scatter.f90.

◆ shared_dofs

type(htable_i8_t) gather_scatter::gs_t::shared_dofs

Definition at line 93 of file gather_scatter.f90.

◆ shared_facet_offset

integer gather_scatter::gs_t::shared_facet_offset

Definition at line 99 of file gather_scatter.f90.

◆ shared_gs

real(kind=rp), dimension(:), allocatable gather_scatter::gs_t::shared_gs

Definition at line 82 of file gather_scatter.f90.

◆ shared_gs_dof

integer, dimension(:), allocatable gather_scatter::gs_t::shared_gs_dof

Definition at line 89 of file gather_scatter.f90.

◆ shared_gs_v

real(kind=rp), dimension(:), allocatable gather_scatter::gs_t::shared_gs_v

Definition at line 86 of file gather_scatter.f90.

◆ shared_gs_v_d

type(c_ptr) gather_scatter::gs_t::shared_gs_v_d = C_NULL_PTR

Definition at line 87 of file gather_scatter.f90.


The documentation for this type was generated from the following file: