Neko 1.99.3
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
mask::mask_t Type Reference

Type for consistently handling masks in Neko. This type encapsulates the mask array and its associated device pointer. More...

Collaboration diagram for mask::mask_t:

Public Member Functions

generic, public init (this, mask_array, n_elements)
 Initialize the mask from a 1-indexed host array.
 
generic, public init (this, mask_array_d, n_elements)
 Initialize the mask from a 0-indexed device array.
 
generic, public init (this, other)
 Initialize the mask from another mask object.
 
procedure, pass(this), public free (this)
 Free the mask object.
 
procedure, pass(this), public invert_from (this, other, total_elements)
 Invert the contents of another mask object.
 
procedure, pass(this), public size (this)
 Get the size of the mask.
 
procedure, pass(this), public is_set (this)
 Check if the mask is set.
 
procedure, pass(this), public get_d (this)
 Get the device pointer to the mask array.
 
generic, public set (this, mask_array, n_elements)
 Set the mask from a 1-indexed host array.
 
generic, public set (this, mask_array_d, n_elements)
 Set the mask from a 0-indexed device array.
 
generic, public get (this)
 Get the mask array.
 
generic, public get (this, index)
 Get the mask array.
 
procedure, pass(thisallocate (this, n_elements)
 Allocate the mask object.
 
procedure, pass(thisinit_from_array (this, mask_array, n_elements)
 Initialize the mask from a 1-indexed host array.
 
procedure, pass(thisinit_from_array_device (this, mask_array_d, n_elements)
 Initialize the mask from a 0-indexed device array.
 
procedure, pass(thisinit_from_mask (this, other)
 Initialize the mask from another mask object.
 
procedure, pass(thisinvert_mask (this, other, total_elements)
 Invert the contents of another mask object.
 
procedure, pass(thismask_set (this, mask_array, n_elements)
 Set the mask from a 1-indexed host array.
 
procedure, pass(thismask_set_d (this, mask_array_d, n_elements)
 Set the mask from a 0-indexed device array.
 
procedure, pass(thismask_get (this)
 Get the mask array.
 
procedure, pass(thismask_get_i (this, index)
 Get the mask array.
 

Public Attributes

integer, dimension(:), allocatable mask
 
type(c_ptr) mask_d = c_null_ptr
 
logical is_set_ = .false.
 

Private Attributes

integer n_elements = 0
 

Detailed Description

Note
The mask is platform-agnostic, meaning it can be used on both CPU and GPU, without adjusting for 1-based or 0-based indexing.

Definition at line 51 of file mask.f90.

Member Function/Subroutine Documentation

◆ allocate()

procedure, pass(this) mask::mask_t::allocate ( class(mask_t), intent(inout this,
integer, intent(in n_elements 
)

Definition at line 73 of file mask.f90.

◆ free()

procedure, pass(this), public mask::mask_t::free ( class(mask_t), intent(inout this)

Definition at line 62 of file mask.f90.

◆ get() [1/2]

generic, public mask::mask_t::get ( class(mask_t), intent(in), target  this)

Definition at line 70 of file mask.f90.

Here is the call graph for this function:

◆ get() [2/2]

generic, public mask::mask_t::get ( class(mask_t), intent(in), target  this,
integer, intent(in index 
)

Definition at line 70 of file mask.f90.

◆ get_d()

procedure, pass(this), public mask::mask_t::get_d ( class(mask_t), intent(in this)

Definition at line 67 of file mask.f90.

◆ init() [1/3]

generic, public mask::mask_t::init ( class(mask_t), intent(inout this,
integer, dimension(n_elements), intent(in mask_array,
integer, intent(in n_elements 
)

Definition at line 60 of file mask.f90.

Here is the call graph for this function:

◆ init() [2/3]

generic, public mask::mask_t::init ( class(mask_t), intent(inout this,
type(c_ptr), intent(inout mask_array_d,
integer, intent(in n_elements 
)

Definition at line 60 of file mask.f90.

◆ init() [3/3]

generic, public mask::mask_t::init ( class(mask_t), intent(inout this,
class(mask_t), intent(inout other 
)

Definition at line 60 of file mask.f90.

◆ init_from_array()

procedure, pass(this) mask::mask_t::init_from_array ( class(mask_t), intent(inout this,
integer, dimension(n_elements), intent(in mask_array,
integer, intent(in n_elements 
)

Definition at line 74 of file mask.f90.

◆ init_from_array_device()

procedure, pass(this) mask::mask_t::init_from_array_device ( class(mask_t), intent(inout this,
type(c_ptr), intent(inout mask_array_d,
integer, intent(in n_elements 
)

Definition at line 75 of file mask.f90.

◆ init_from_mask()

procedure, pass(this) mask::mask_t::init_from_mask ( class(mask_t), intent(inout this,
class(mask_t), intent(inout other 
)

Definition at line 76 of file mask.f90.

◆ invert_from()

procedure, pass(this), public mask::mask_t::invert_from ( class(mask_t), intent(inout this,
class(mask_t), intent(in other,
integer, intent(in total_elements 
)

Definition at line 64 of file mask.f90.

◆ invert_mask()

procedure, pass(this) mask::mask_t::invert_mask ( class(mask_t), intent(inout this,
class(mask_t), intent(in other,
integer, intent(in total_elements 
)

Definition at line 77 of file mask.f90.

◆ is_set()

procedure, pass(this), public mask::mask_t::is_set ( class(mask_t), intent(in this)

Definition at line 66 of file mask.f90.

◆ mask_get()

procedure, pass(this) mask::mask_t::mask_get ( class(mask_t), intent(in), target  this)

Definition at line 84 of file mask.f90.

◆ mask_get_i()

procedure, pass(this) mask::mask_t::mask_get_i ( class(mask_t), intent(in), target  this,
integer, intent(in index 
)

Definition at line 85 of file mask.f90.

◆ mask_set()

procedure, pass(this) mask::mask_t::mask_set ( class(mask_t), intent(inout this,
integer, dimension(n_elements), intent(in mask_array,
integer, intent(in n_elements 
)

Definition at line 80 of file mask.f90.

◆ mask_set_d()

procedure, pass(this) mask::mask_t::mask_set_d ( class(mask_t), intent(inout this,
type(c_ptr), intent(inout mask_array_d,
integer, intent(in n_elements 
)

Definition at line 81 of file mask.f90.

◆ set() [1/2]

generic, public mask::mask_t::set ( class(mask_t), intent(inout this,
integer, dimension(n_elements), intent(in mask_array,
integer, intent(in n_elements 
)

Definition at line 69 of file mask.f90.

Here is the call graph for this function:

◆ set() [2/2]

generic, public mask::mask_t::set ( class(mask_t), intent(inout this,
type(c_ptr), intent(inout mask_array_d,
integer, intent(in n_elements 
)

Definition at line 69 of file mask.f90.

◆ size()

procedure, pass(this), public mask::mask_t::size ( class(mask_t), intent(in this)

Definition at line 65 of file mask.f90.

Member Data Documentation

◆ is_set_

logical mask::mask_t::is_set_ = .false.

Definition at line 56 of file mask.f90.

◆ mask

integer, dimension(:), allocatable mask::mask_t::mask

Definition at line 54 of file mask.f90.

◆ mask_d

type(c_ptr) mask::mask_t::mask_d = c_null_ptr

Definition at line 55 of file mask.f90.

◆ n_elements

integer mask::mask_t::n_elements = 0
private

Definition at line 53 of file mask.f90.


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