Overloads multiplication operator for a scalar of type int64 and a tensor.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int64), | intent(in) | :: | scalar | |||
type(torch_tensor), | intent(in) | :: | tensor |
function torch_tensor_premultiply_int64(scalar, tensor) result(output) integer(kind=int64), intent(in) :: scalar type(torch_tensor), intent(in) :: tensor type(torch_tensor) :: output interface function torch_tensor_premultiply_c(scalar_c, tensor_c) result(output_c) & bind(c, name = 'torch_tensor_premultiply') use, intrinsic :: iso_c_binding, only : c_ptr use, intrinsic :: iso_fortran_env, only : int64 implicit none integer(kind=int64), value, intent(in) :: scalar_c type(c_ptr), value, intent(in) :: tensor_c type(c_ptr) :: output_c end function torch_tensor_premultiply_c end interface output%p = torch_tensor_premultiply_c(scalar, tensor%p) end function torch_tensor_premultiply_int64