Overloads division operator for a tensor and a scalar of type real64.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(torch_tensor), | intent(in) | :: | tensor | |||
real(kind=real64), | intent(in) | :: | divisor |
function torch_tensor_postdivide_real64(tensor, divisor) result(output) use, intrinsic :: iso_c_binding, only : c_loc use, intrinsic :: iso_fortran_env, only : real64 type(torch_tensor), intent(in) :: tensor real(real64), intent(in) :: divisor type(torch_tensor) :: wrk, output ! Create a tensor with a single entry, the scalar post-divisor call torch_tensor_from_array(wrk, [divisor], [1], tensor%get_device_type(), & tensor%get_device_index()) output%p = torch_tensor_divide_c(tensor%p, wrk%p) end function torch_tensor_postdivide_real64