array_functions_implementation Submodule


Uses

  • module~~array_functions_implementation~~UsesGraph module~array_functions_implementation array_functions_implementation module~assertions_interface assertions_interface module~array_functions_implementation->module~assertions_interface module~array_functions_interface array_functions_interface module~array_functions_implementation->module~array_functions_interface module~kind_parameters kind_parameters module~array_functions_interface->module~kind_parameters iso_fortran_env iso_fortran_env module~kind_parameters->iso_fortran_env

Contents


Module Procedures

module procedure column_vectors pure module function column_vectors(vector_field) result(array_of_3d_column_vectors)

Arguments

Type IntentOptional AttributesName
real(kind=r8k), intent(in), dimension(:,:,:,:):: vector_field

Return Value real(kind=r8k), dimension(:,:), allocatable

module procedure concatenate_columns pure module function concatenate_columns(a, b) result(concatenated)

Using RESHAPE rather than manipulating array elements directly frees the compiler to decide the particular order of array element references that best exploits the given platform. Alternatively, DO CONCURRENT could instead free the compiler to order element accesses however is best. Trade-off: RESHAPE requires the creation of temporary array results but RESHAPE is likely to have more mature compiler support than DO CONCURRENT. If this code turns out to be a critical performance bottleneck, try replacing this implementation with element-by-element copying using DO CONCURRENT.

Arguments

Type IntentOptional AttributesName
real(kind=r8k), intent(in), dimension(:,:):: a
real(kind=r8k), intent(in), dimension(:,:):: b

Return Value real(kind=r8k), dimension(:,:), allocatable

module procedure concatenate_rows pure module function concatenate_rows(a, b) result(concatenated)

For simplicity, this implementation invokes concatenate_columns at the cost of TRANSPOSE creating additional temporaries. If this code turns out to be a critical performance bottleneck, try replacing this implementation with element-by-element copying using DO CONCURRENT.

Arguments

Type IntentOptional AttributesName
real(kind=r8k), intent(in), dimension(:,:):: a
real(kind=r8k), intent(in), dimension(:,:):: b

Return Value real(kind=r8k), dimension(:,:), allocatable