ndarray_oc_create_array Subroutine

public subroutine ndarray_oc_create_array(this, x, n, level, shape)

Subroutine to create an array of arrays

Arguments

Type IntentOptional AttributesName
class(ndarray_oc_factory), intent(inout) :: this
class(pf_encap_t), intent(inout), allocatable:: x(:)
integer, intent(in) :: n
integer, intent(in) :: level
integer, intent(in) :: shape(:)

Contents


Source Code

  subroutine ndarray_oc_create_array(this, x, n, level, shape)
    class(ndarray_oc_factory), intent(inout)              :: this
    class(pf_encap_t),         intent(inout), allocatable :: x(:)
    integer,                   intent(in   )              :: n, level, shape(:)
    integer :: i
    allocate(ndarray_oc::x(n))
    do i = 1, n
       call ndarray_oc_build(x(i), shape)
    end do
  end subroutine ndarray_oc_create_array