Overloads assignment operator for tensors.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(torch_tensor), | intent(out) | :: | output | |||
type(torch_tensor), | intent(in) | :: | input |
subroutine torch_tensor_assign(output, input) type(torch_tensor), intent(out) :: output type(torch_tensor), intent(in) :: input interface function torch_tensor_assign_c(input_c) result(output_c) & bind(c, name = 'torch_tensor_assign') use, intrinsic :: iso_c_binding, only : c_ptr implicit none type(c_ptr), value, intent(in) :: input_c type(c_ptr) :: output_c end function torch_tensor_assign_c end interface output%p = torch_tensor_assign_c(input%p) end subroutine torch_tensor_assign