Overloads exponentiation operator for a tensor and a scalar of type int16
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(torch_tensor), | intent(in) | :: | tensor | |||
integer(kind=int16), | intent(in), | target | :: | power |
function torch_tensor_power_int16(tensor, power) result(output) use, intrinsic :: iso_c_binding, only : c_loc use, intrinsic :: iso_fortran_env, only : int16 type(torch_tensor), intent(in) :: tensor integer(int16), target, intent(in) :: power type(torch_tensor) :: output interface function torch_tensor_power_int_c(tensor_c, power_c) result(output_c) & bind(c, name = 'torch_tensor_power_int') use, intrinsic :: iso_c_binding, only : c_ptr, c_int16_t implicit none type(c_ptr), value, intent(in) :: tensor_c type(c_ptr), value, intent(in) :: power_c type(c_ptr) :: output_c end function torch_tensor_power_int_c end interface output%p = torch_tensor_power_int_c(tensor%p, c_loc(power)) end function torch_tensor_power_int16