Neko  0.8.1
A portable framework for high-order spectral element flow simulations
gs_cpu Module Reference

Generic Gather-scatter backend for CPUs. More...

Data Types

type  gs_cpu_t
 Gather-scatter backend for CPUs. More...
 

Functions/Subroutines

subroutine gs_cpu_init (this, nlocal, nshared, nlcl_blks, nshrd_blks)
 Dummy backend initialisation. More...
 
subroutine gs_cpu_free (this)
 Dummy backend deallocation. More...
 
subroutine gs_gather_cpu (this, v, m, o, dg, u, n, gd, nb, b, op, shrd)
 Gather kernel. More...
 
subroutine gs_gather_kernel_add (v, m, o, dg, u, n, gd, nb, b)
 Gather kernel for addition of data \( v(dg(i)) = v(dg(i)) + u(gd(i)) \). More...
 
subroutine gs_gather_kernel_mul (v, m, o, dg, u, n, gd, nb, b)
 Gather kernel for multiplication of data \( v(dg(i)) = v(dg(i)) \cdot u(gd(i)) \). More...
 
subroutine gs_gather_kernel_min (v, m, o, dg, u, n, gd, nb, b)
 Gather kernel for minimum of data \( v(dg(i)) = \min(v(dg(i)), u(gd(i))) \). More...
 
subroutine gs_gather_kernel_max (v, m, o, dg, u, n, gd, nb, b)
 Gather kernel for maximum of data \( v(dg(i)) = \max(v(dg(i)), u(gd(i))) \). More...
 
subroutine gs_scatter_cpu (this, v, m, dg, u, n, gd, nb, b, shrd, event)
 Scatter kernel. More...
 
subroutine gs_scatter_kernel (v, m, dg, u, n, gd, nb, b)
 Scatter kernel \( u(gd(i) = v(dg(i)) \). More...
 

Detailed Description

Generic Gather-scatter backend for CPUs.

Function/Subroutine Documentation

◆ gs_cpu_free()

subroutine gs_cpu::gs_cpu_free ( class(gs_cpu_t), intent(inout)  this)
private

Dummy backend deallocation.

Definition at line 63 of file gs_cpu.f90.

◆ gs_cpu_init()

subroutine gs_cpu::gs_cpu_init ( class(gs_cpu_t), intent(inout)  this,
integer, intent(in)  nlocal,
integer, intent(in)  nshared,
integer, intent(in)  nlcl_blks,
integer, intent(in)  nshrd_blks 
)

Dummy backend initialisation.

Definition at line 54 of file gs_cpu.f90.

◆ gs_gather_cpu()

subroutine gs_cpu::gs_gather_cpu ( class(gs_cpu_t), intent(inout)  this,
real(kind=rp), dimension(m), intent(inout)  v,
integer, intent(in)  m,
integer, intent(in)  o,
integer, dimension(m), intent(inout)  dg,
real(kind=rp), dimension(n), intent(inout)  u,
integer, intent(in)  n,
integer, dimension(m), intent(inout)  gd,
integer, intent(in)  nb,
integer, dimension(nb), intent(inout)  b,
integer, intent(in)  op,
logical, intent(in)  shrd 
)
private

Gather kernel.

Definition at line 68 of file gs_cpu.f90.

Here is the call graph for this function:

◆ gs_gather_kernel_add()

subroutine gs_cpu::gs_gather_kernel_add ( real(kind=rp), dimension(m), intent(inout)  v,
integer, intent(in)  m,
integer, intent(in)  o,
integer, dimension(m), intent(inout)  dg,
real(kind=rp), dimension(n), intent(inout)  u,
integer, intent(in)  n,
integer, dimension(m), intent(inout)  gd,
integer, intent(in)  nb,
integer, dimension(nb), intent(inout)  b 
)
private

Gather kernel for addition of data \( v(dg(i)) = v(dg(i)) + u(gd(i)) \).

Definition at line 97 of file gs_cpu.f90.

Here is the caller graph for this function:

◆ gs_gather_kernel_max()

subroutine gs_cpu::gs_gather_kernel_max ( real(kind=rp), dimension(m), intent(inout)  v,
integer, intent(in)  m,
integer, intent(in)  o,
integer, dimension(m), intent(inout)  dg,
real(kind=rp), dimension(n), intent(inout)  u,
integer, intent(in)  n,
integer, dimension(m), intent(inout)  gd,
integer, intent(in)  nb,
integer, dimension(nb), intent(inout)  b 
)
private

Gather kernel for maximum of data \( v(dg(i)) = \max(v(dg(i)), u(gd(i))) \).

Definition at line 214 of file gs_cpu.f90.

Here is the caller graph for this function:

◆ gs_gather_kernel_min()

subroutine gs_cpu::gs_gather_kernel_min ( real(kind=rp), dimension(m), intent(inout)  v,
integer, intent(in)  m,
integer, intent(in)  o,
integer, dimension(m), intent(inout)  dg,
real(kind=rp), dimension(n), intent(inout)  u,
integer, intent(in)  n,
integer, dimension(m), intent(inout)  gd,
integer, intent(in)  nb,
integer, dimension(nb), intent(inout)  b 
)
private

Gather kernel for minimum of data \( v(dg(i)) = \min(v(dg(i)), u(gd(i))) \).

Definition at line 175 of file gs_cpu.f90.

Here is the caller graph for this function:

◆ gs_gather_kernel_mul()

subroutine gs_cpu::gs_gather_kernel_mul ( real(kind=rp), dimension(m), intent(inout)  v,
integer, intent(in)  m,
integer, intent(in)  o,
integer, dimension(m), intent(inout)  dg,
real(kind=rp), dimension(n), intent(inout)  u,
integer, intent(in)  n,
integer, dimension(m), intent(inout)  gd,
integer, intent(in)  nb,
integer, dimension(nb), intent(inout)  b 
)
private

Gather kernel for multiplication of data \( v(dg(i)) = v(dg(i)) \cdot u(gd(i)) \).

Definition at line 136 of file gs_cpu.f90.

Here is the caller graph for this function:

◆ gs_scatter_cpu()

subroutine gs_cpu::gs_scatter_cpu ( class(gs_cpu_t), intent(inout)  this,
real(kind=rp), dimension(m), intent(inout)  v,
integer, intent(in)  m,
integer, dimension(m), intent(inout)  dg,
real(kind=rp), dimension(n), intent(inout)  u,
integer, intent(in)  n,
integer, dimension(m), intent(inout)  gd,
integer, intent(in)  nb,
integer, dimension(nb), intent(inout)  b,
logical, intent(in)  shrd,
type(c_ptr)  event 
)
private

Scatter kernel.

Todo:
Make the kernel abstract

Definition at line 252 of file gs_cpu.f90.

Here is the call graph for this function:

◆ gs_scatter_kernel()

subroutine gs_cpu::gs_scatter_kernel ( real(kind=rp), dimension(m), intent(inout)  v,
integer, intent(in)  m,
integer, dimension(m), intent(inout)  dg,
real(kind=rp), dimension(n), intent(inout)  u,
integer, intent(in)  n,
integer, dimension(m), intent(inout)  gd,
integer, intent(in)  nb,
integer, dimension(nb), intent(inout)  b 
)
private

Scatter kernel \( u(gd(i) = v(dg(i)) \).

Definition at line 270 of file gs_cpu.f90.

Here is the caller graph for this function: