Returns a 1-d array of floating-point ones. This procedure is overloaded by
the generic procedure ones
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=ik), | intent(in) | :: | length | Array length |
||
real(kind=rk), | intent(in) | :: | kindflag | Array type |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
pure function ones_real(length,kindflag) result(ones)
!! Returns a 1-d array of floating-point ones. This procedure is overloaded by
!! the generic procedure `ones`.
integer(kind=ik),intent(in) :: length !! Array length
real(kind=rk),intent(in) :: kindflag !! Array type
real(kind=rk),dimension(:),allocatable :: ones
allocate(ones(length))
ones = 1._rk
endfunction ones_real