cable_array_utils_mod Module

Utility procedures for working with arrays.


Uses

  • module~~cable_array_utils_mod~~UsesGraph module~cable_array_utils_mod cable_array_utils_mod iso_fortran_env iso_fortran_env module~cable_array_utils_mod->iso_fortran_env

Used by

  • module~~cable_array_utils_mod~~UsedByGraph module~cable_array_utils_mod cable_array_utils_mod module~cable_input_module cable_input_module module~cable_input_module->module~cable_array_utils_mod module~cable_netcdf_decomp_util_mod cable_netcdf_decomp_util_mod module~cable_netcdf_decomp_util_mod->module~cable_array_utils_mod module~cable_netcdf_nf90_mod cable_netcdf_nf90_mod module~cable_netcdf_nf90_mod->module~cable_array_utils_mod module~cable_output_decomp_smod cable_output_decomp_smod module~cable_output_decomp_smod->module~cable_array_utils_mod module~cable_output_decomp_smod->module~cable_netcdf_decomp_util_mod module~cable_output_impl_smod cable_output_impl_smod module~cable_output_impl_smod->module~cable_array_utils_mod module~cable_output_reduction_buffers_smod cable_output_reduction_buffers_smod module~cable_output_reduction_buffers_smod->module~cable_array_utils_mod module~cable_driver_common_mod cable_driver_common_mod module~cable_driver_common_mod->module~cable_input_module module~cable_netcdf_init_smod cable_netcdf_init_smod module~cable_netcdf_init_smod->module~cable_netcdf_nf90_mod module~cable_serial cable_serial module~cable_serial->module~cable_input_module module~cable_serial->module~cable_driver_common_mod proc~mpidrv_master~2 mpidrv_master proc~mpidrv_master~2->module~cable_input_module proc~mpidrv_worker mpidrv_worker proc~mpidrv_worker->module~cable_input_module proc~worker_cable_params worker_cable_params proc~worker_cable_params->module~cable_input_module module~cable_mpimaster~2 cable_mpimaster module~cable_mpimaster~2->module~cable_driver_common_mod module~cable_mpiworker~2 cable_mpiworker module~cable_mpiworker~2->module~cable_driver_common_mod program~cable_offline_driver cable_offline_driver program~cable_offline_driver->module~cable_driver_common_mod program~cable_offline_driver->module~cable_serial program~cable_offline_driver->module~cable_mpiworker~2

Interfaces

public interface array_eq

  • private function array_eq_int32(a, b)

    Check if two integer arrays are equal.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=int32), intent(in), dimension(:) :: a
    integer(kind=int32), intent(in), dimension(:) :: b

    Return Value logical


Functions

public function array_offset(index, shape) result(offset)

Calculate the memory offset corresponding to a given index in a multi-dimensional array.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: index(:)

The multi-dimensional index for which to calculate the offset.

integer, intent(in) :: shape(:)

The shape of the multi-dimensional array.

Return Value integer

The calculated memory offset corresponding to the given index.

private function array_eq_int32(a, b)

Check if two integer arrays are equal.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in), dimension(:) :: a
integer(kind=int32), intent(in), dimension(:) :: b

Return Value logical


Subroutines

public subroutine array_index(offset_in, shape, index)

Calculate the index corresponding to a given memory offset in a multi-dimensional array.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: offset_in

The memory offset for which to calculate the multi-dimensional index.

integer, intent(in) :: shape(:)

The shape of the multi-dimensional array.

integer, intent(inout) :: index(:)

The calculated multi-dimensional index corresponding to the given offset.

public subroutine array_partition(n, k, p, start, count)

Compute start and count for the p'th partition of an array of size n where p = 0, 1, ... , k - 1.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n

The total number of elements in the array to be partitioned.

integer, intent(in) :: k

The total number of partitions.

integer, intent(in) :: p

The index of the partition for which to compute the start and count (0-based).

integer, intent(out) :: start

The starting index (1-based) of the p'th partition in the array.

integer, intent(out) :: count

The number of elements in the p'th partition.