ndarray_oc_destroy_single Subroutine

public subroutine ndarray_oc_destroy_single(this, x, level, shape)

Subroutine to destroy an single array

Arguments

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

Contents


Source Code

  subroutine ndarray_oc_destroy_single(this, x, level, shape)
    class(ndarray_oc_factory), intent(inout)              :: this
    class(pf_encap_t),         intent(inout), allocatable :: x
    integer,                   intent(in   )              :: level, shape(:)
    
    select type (x)
    class is (ndarray_oc)
       deallocate(x%pflatarray)
       deallocate(x%yflatarray)
       deallocate(x%shape)
    class default
      stop "TYPE ERROR in ndarray_oc_destroy_single"
    end select
    deallocate(x)
  end subroutine ndarray_oc_destroy_single