Deallocates a tensor.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(torch_tensor), | intent(inout) | :: | tensor |
subroutine torch_tensor_delete(tensor) type(torch_tensor), intent(inout) :: tensor interface subroutine torch_tensor_delete_c(tensor) & bind(c, name = 'torch_tensor_delete') use, intrinsic :: iso_c_binding, only : c_ptr type(c_ptr), value, intent(in) :: tensor end subroutine torch_tensor_delete_c end interface call torch_tensor_delete_c(tensor%p) end subroutine torch_tensor_delete