Create a 1D array from start to stop in given increments of 1 or optionally step
Example Usage
program arangeTest use variableKind, only: i32,i64,r32,r64 use m_allocatable, only: allocatable use m_array1D, only: arange real(r32), allocatable :: a(:) integer(i32), allocatable :: b(:) real(r64), allocatable :: c(:) integer(i64), allocatable :: d(:) integer :: N N = 10000 call allocate(a, N) call allocate(b, N) call allocate(c, N) call allocate(d, N) call arange(a, 1, N) call arange(b, 1, N) call arange(c, 1, N) call arange(d, 1, N) call deallocate(a) call deallocate(b) call deallocate(c) call deallocate(d) end program
Interfaced with arange
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r32), | intent(inout), | allocatable | :: | res(:) | ||
real(kind=r32), | intent(in) | :: | start | Start from here |
||
real(kind=r32), | intent(in) | :: | stp | Stop here |
||
real(kind=r32), | intent(in), | optional | :: | step | Step size |
Interfaced with arange
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(inout), | allocatable | :: | res(:) | ||
real(kind=r64), | intent(in) | :: | start | Start from here |
||
real(kind=r64), | intent(in) | :: | stp | Stop here |
||
real(kind=r64), | intent(in), | optional | :: | step | Step size |
Interfaced with arange
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i32), | intent(inout), | allocatable | :: | res(:) | ||
integer(kind=i32), | intent(in) | :: | start | Start from here |
||
integer(kind=i32), | intent(in) | :: | stp | Stop here |
||
integer(kind=i32), | intent(in), | optional | :: | step | Step size |
Interfaced with arange
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i64), | intent(inout), | allocatable | :: | res(:) | ||
integer(kind=i64), | intent(in) | :: | start | Start from here |
||
integer(kind=i64), | intent(in) | :: | stp | Stop here |
||
integer(kind=i64), | intent(in), | optional | :: | step | Step size |