|
Neko 1.99.11
A portable framework for high-order spectral element flow simulations
|
Type for consistently handling masks in Neko. This type encapsulates the mask array and its associated device pointer. More...
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(this) | allocate (this, n_elements) |
| Allocate the mask object. | |
| procedure, pass(this) | init_from_array (this, mask_array, n_elements) |
| Initialize the mask from a 1-indexed host array. | |
| procedure, pass(this) | init_from_array_device (this, mask_array_d, n_elements) |
| Initialize the mask from a 0-indexed device array. | |
| procedure, pass(this) | init_from_mask (this, other) |
| Initialize the mask from another mask object. | |
| procedure, pass(this) | invert_mask (this, other, total_elements) |
| Invert the contents of another mask object. | |
| procedure, pass(this) | mask_set (this, mask_array, n_elements) |
| Set the mask from a 1-indexed host array. | |
| procedure, pass(this) | mask_set_d (this, mask_array_d, n_elements) |
| Set the mask from a 0-indexed device array. | |
| procedure, pass(this) | mask_get (this) |
| Get the mask array. | |
| procedure, pass(this) | mask_get_i (this, index) |
| Get the mask array. | |
Public Attributes | |
| integer, dimension(:), allocatable | mask |
| The mask array, 1-based (Fortran) indices. | |
| type(c_ptr) | mask_d = c_null_ptr |
| Device copy of the mask, 0-based indices. It is a separate allocation and never a mapping of mask: the two copies carry different conventions, and on a unified-memory backend a mapped array aliases its host array, so the in-place shift to 0-based would corrupt the host copy that later merges read. | |
| logical | is_set_ = .false. |
Private Attributes | |
| integer | n_elements = 0 |
| procedure, pass(this) mask::mask_t::allocate | ( | class(mask_t), intent(inout) | this, |
| integer, intent(in) | n_elements ) |
| procedure, pass(this), public mask::mask_t::free | ( | class(mask_t), intent(inout) | this | ) |
| generic, public mask::mask_t::get | ( | class(mask_t), intent(in), target | this | ) |
| generic, public mask::mask_t::get | ( | class(mask_t), intent(in), target | this, |
| integer, intent(in) | index ) |
| procedure, pass(this), public mask::mask_t::get_d | ( | class(mask_t), intent(in) | this | ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| procedure, pass(this), public mask::mask_t::is_set | ( | class(mask_t), intent(in) | this | ) |
| procedure, pass(this) mask::mask_t::mask_get | ( | class(mask_t), intent(in), target | this | ) |
| procedure, pass(this) mask::mask_t::mask_get_i | ( | class(mask_t), intent(in), target | this, |
| integer, intent(in) | index ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| procedure, pass(this), public mask::mask_t::size | ( | class(mask_t), intent(in) | this | ) |