torch_tensor_print Subroutine

public subroutine torch_tensor_print(tensor)

Prints the contents of a tensor.

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(in) :: tensor

Input tensor


Source Code

  subroutine torch_tensor_print(tensor)
    type(torch_tensor), intent(in) :: tensor  !! Input tensor

    interface
      subroutine torch_tensor_print_c(tensor) &
          bind(c, name = 'torch_tensor_print')
        use, intrinsic :: iso_c_binding, only : c_ptr
        type(c_ptr), value, intent(in) :: tensor
      end subroutine torch_tensor_print_c
    end interface

    call torch_tensor_print_c(tensor%p)
  end subroutine torch_tensor_print