Compute the difference along an array
Example Usage
program arangeTest use variableKind, only: i32,i64,r32,r64 use m_allocatable, only: allocatable use m_array1D, only: arange, diff 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 diff(a, 1, N) call diff(b, 1, N) call diff(c, 1, N) call diff(d, 1, N) call deallocate(a) call deallocate(b) call deallocate(c) call deallocate(d) end program
Interfaced with diff
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r32), | intent(in) | :: | this(:) | 1D array |
||
real(kind=r32) | :: | res(:) | Difference along array |
Interfaced with diff
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | this(:) | 1D array |
||
real(kind=r64) | :: | res(:) | Difference along array |
Interfaced with diff
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i32), | intent(in) | :: | this(:) | 1D array |
||
integer(kind=i32) | :: | res(:) | Difference along array |
Interfaced with diff
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i64), | intent(in) | :: | this(:) | 1D array |
||
integer(kind=i64) | :: | res(:) | Difference along array |