data_array_2d_t Derived Type

type, public, extends(data_array_t) :: data_array_2d_t

Type to store the data of a 2 dimensional array


Finalization Procedures

final :: finalize_2d

  • private interface finalize_2d()

    Arguments

    None

Type-Bound Procedures

procedure, public :: get_dimension

  • private pure function get_dimension(this)

    Returns the number of dimension or rank of the array

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_t), intent(in) :: this

    Instance of the type

    Return Value integer

procedure, public :: get_size

  • private pure function get_size(this)

    Returns the total number of elements of the array

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_t), intent(in) :: this

    Instance of the type

    Return Value integer(kind=int64)

procedure, public :: get_size_stripped

  • private pure function get_size_stripped(this)

    Returns the total number of elements of the array without ghost

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_t), intent(in) :: this

    Instance of the type

    Return Value integer(kind=int64)

procedure, public :: get_shape

  • private pure function get_shape(this) result(arr_shp)

    Returns the array specifying the number of elements for each dimension

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_t), intent(in) :: this

    Instance of the type

    Return Value integer, (this%array_dim)

procedure, public :: get_shape_stripped

  • private pure function get_shape_stripped(this) result(arr_shp_stripped)

    Returns the array specifying the number of elements without ghost for each dimension

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_t), intent(in) :: this

    Instance of the type

    Return Value integer, (this%array_dim)

procedure, public :: get_lbound

  • private pure function get_lbound(this) result(lb)

    Returns the array specifying the lower boundary index for each dimension

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_t), intent(in) :: this

    Instance of the type

    Return Value integer, (this%array_dim)

procedure, public :: get_ubound

  • private pure function get_ubound(this) result(ub)

    Returns the array specifying the upper boundary index for each dimension

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_t), intent(in) :: this

    Instance of the type

    Return Value integer, (this%array_dim)

procedure, public :: get_lbound_stripped

  • private pure function get_lbound_stripped(this) result(lb_stripped)

    Returns the array specifying the lower boundary index without ghost for each dimension

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_t), intent(in) :: this

    Instance of the type

    Return Value integer, (this%array_dim)

procedure, public :: get_ubound_stripped

  • private pure function get_ubound_stripped(this) result(ub_stripped)

    Returns the array specifying the upper boundary index without ghost for each dimension

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_t), intent(in) :: this

    Instance of the type

    Return Value integer, (this%array_dim)

procedure, public :: is_distributed

  • private pure function is_distributed(this) result(res)

    Returns true if the array is distributed array, otherwise false

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_t), intent(in) :: this

    Instance of the type

    Return Value logical

generic, public :: initialize => initialize_local, initialize_distributed, initialize_with_mold

  • private interface initialize_local()

    Arguments

    None
  • private interface initialize_distributed()

    Arguments

    None
  • private interface initialize_with_mold()

    Arguments

    None

procedure, public :: update_host

  • interface

    private module subroutine update_host(this)

    Update the array on CPU from GPU. This does nothing if no specific GPU backend is set.

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_t), intent(inout) :: this

    Instance of the type

procedure, public :: update_device

  • interface

    private module subroutine update_device(this)

    Update the array on GPU from CPU. This does nothing if no specific GPU backend is set.

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_t), intent(inout) :: this

    Instance of the type

procedure, public :: get_cxx_pointer => get_data_array_cxx_pointer

  • private function get_data_array_cxx_pointer(this) result(pptr)

    Returns the C pointer of the data_array_t C++ class instance pointer

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_t), intent(inout), target :: this

    Instance of the type

    Return Value type(C_PTR), pointer

procedure, public :: get_readonly_cxx_pointer => get_data_array_readonly_cxx_pointer

  • private function get_data_array_readonly_cxx_pointer(this) result(pptr)

    Returns the readonly C pointer of the data_array_t C++ class instance pointer

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_t), intent(in), target :: this

    Instance of the type

    Return Value type(C_PTR), pointer

procedure, public :: get_pointer => get_pointer_2d

  • private function get_pointer_2d(this) result(ptr)

    Returns the pointer to the 2d array

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_2d_t), intent(inout), target :: this

    Instance of the type

    Return Value real(kind=GP), contiguous, pointer, dimension(:,:)

procedure, public :: get_pointer_stripped => get_pointer_stripped_2d

  • private function get_pointer_stripped_2d(this) result(ptr)

    Returns the pointer to the 2d array without the ghost cells

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_2d_t), intent(inout), target :: this

    Instance of the type

    Return Value real(kind=GP), pointer, dimension(:,:)

procedure, public :: get_readonly_pointer => get_readonly_pointer_2d

  • private function get_readonly_pointer_2d(this) result(ptr)

    Returns the readonly pointer to the 2d array

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_2d_t), intent(in), target :: this

    Instance of the type

    Return Value real(kind=GP), contiguous, pointer, dimension(:,:)

procedure, public :: get_readonly_pointer_stripped => get_readonly_pointer_stripped_2d

  • private function get_readonly_pointer_stripped_2d(this) result(ptr)

    Returns the readonly pointer to the 2d array without the ghost cells

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_2d_t), intent(in), target :: this

    Instance of the type

    Return Value real(kind=GP), pointer, dimension(:,:)

procedure, public :: get_device_pointer => get_device_pointer_2d

  • private function get_device_pointer_2d(this) result(dev_ptr)

    Returns the device pointer of the 2d array

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_2d_t), intent(inout), target :: this

    Instance of the type

    Return Value real(kind=GP), contiguous, pointer, dimension(:,:)

procedure, public :: get_readonly_device_pointer => get_readonly_device_pointer_2d

  • private function get_readonly_device_pointer_2d(this) result(dev_ptr)

    Returns the readonly device pointer of the 2d array

    Arguments

    Type IntentOptional Attributes Name
    class(data_array_2d_t), intent(in), target :: this

    Instance of the type

    Return Value real(kind=GP), contiguous, pointer, dimension(:,:)