Skip to content

Commit

Permalink
Rename one of the functions
Browse files Browse the repository at this point in the history
  • Loading branch information
minhqdao committed Aug 2, 2024
1 parent a79741e commit 2ab6354
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/stdlib_io_np.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ module stdlib_io_np
end
end interface

interface allocate_array
interface allocate_array_from_shape
#:for k1, t1 in KINDS_TYPES
#:for rank in RANKS
module subroutine allocate_array_${t1[0]}$${k1}$_${rank}$ (array, vshape, stat)
module subroutine allocate_array_from_shape_${t1[0]}$${k1}$_${rank}$ (array, vshape, stat)
!> Instance of the array to be allocated.
${t1}$, allocatable, intent(out) :: array${ranksuffix(rank)}$
!> Dimensions to allocate for.
Expand Down
6 changes: 3 additions & 3 deletions src/stdlib_io_np_load.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ contains
exit catch
end if

call allocate_array(array, vshape, stat)
call allocate_array_from_shape(array, vshape, stat)
if (stat /= 0) then
msg = "Failed to allocate array of type '"//vtype//"' "//&
& "with total size of "//to_string(product(vshape))
Expand Down Expand Up @@ -85,7 +85,7 @@ contains

#:for k1, t1 in KINDS_TYPES
#:for rank in RANKS
module subroutine allocate_array_${t1[0]}$${k1}$_${rank}$(array, vshape, stat)
module subroutine allocate_array_from_shape_${t1[0]}$${k1}$_${rank}$(array, vshape, stat)
${t1}$, allocatable, intent(out) :: array${ranksuffix(rank)}$
integer, intent(in) :: vshape(:)
integer, intent(out) :: stat
Expand Down Expand Up @@ -169,7 +169,7 @@ contains
block
${t1}$, allocatable :: array${ranksuffix(rank)}$

call allocate_array(array, vshape, stat)
call allocate_array_from_shape(array, vshape, stat)
if (stat /= 0) then
msg = "Failed to allocate array of type '"//this_type//"'."; return
end if
Expand Down

0 comments on commit 2ab6354

Please sign in to comment.