sourcery_array_functions_s Submodule


Uses

    • assert_m
  • module~~sourcery_array_functions_s~~UsesGraph module~sourcery_array_functions_s sourcery_array_functions_s assert_m assert_m module~sourcery_array_functions_s->assert_m module~sourcery_array_functions_m sourcery_array_functions_m module~sourcery_array_functions_s->module~sourcery_array_functions_m

Module Procedures

module procedure /home/runner/work/sourcery/sourcery/doc/html/module/sourcery_array_functions_s.html column_vectors pure module function column_vectors(vector_field) result(array_of_3D_column_vectors)

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension(:,:,:,:) :: vector_field

Return Value real, dimension(:,:), allocatable

module procedure /home/runner/work/sourcery/sourcery/doc/html/module/sourcery_array_functions_s.html 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 Attributes Name
real, intent(in), dimension(:,:) :: a
real, intent(in), dimension(:,:) :: b

Return Value real, dimension(:,:), allocatable

module procedure /home/runner/work/sourcery/sourcery/doc/html/module/sourcery_array_functions_s.html 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 Attributes Name
real, intent(in), dimension(:,:) :: a
real, intent(in), dimension(:,:) :: b

Return Value real, dimension(:,:), allocatable