ndarray_destroy Subroutine

public subroutine ndarray_destroy(encap)

Subroutine to destroy array

Arguments

Type IntentOptional AttributesName
class(pf_encap_t), intent(inout) :: encap

Calls

proc~~ndarray_destroy~~CallsGraph proc~ndarray_destroy ndarray_destroy proc~cast_as_ndarray cast_as_ndarray proc~ndarray_destroy->proc~cast_as_ndarray

Contents

Source Code


Source Code

  subroutine ndarray_destroy(encap)
    class(pf_encap_t), intent(inout) :: encap
    type(ndarray), pointer :: ndarray_obj

    ndarray_obj => cast_as_ndarray(encap)

    deallocate(ndarray_obj%shape)
    deallocate(ndarray_obj%flatarray)

    nullify(ndarray_obj)

  end subroutine ndarray_destroy