Subroutine to create an array of arrays
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ndarray_factory), | intent(inout) | :: | this | |||
class(pf_encap_t), | intent(inout), | allocatable | :: | x(:) | ||
integer, | intent(in) | :: | n | |||
integer, | intent(in) | :: | level | |||
integer, | intent(in) | :: | shape(:) |
subroutine ndarray_create_array(this, x, n, level, shape)
class(ndarray_factory), intent(inout) :: this
class(pf_encap_t), intent(inout), allocatable :: x(:)
integer, intent(in ) :: n, level, shape(:)
integer :: i
allocate(ndarray::x(n))
do i = 1, n
call ndarray_build(x(i), shape)
end do
end subroutine ndarray_create_array