LCOV - code coverage report
Current view: top level - home/runner/.local/lib/python3.9/site-packages/torch/include/ATen/ops - eye.h (source / functions) Hit Total Coverage
Test: plumed test coverage Lines: 2 2 100.0 %
Date: 2025-11-25 13:55:50 Functions: 1 1 100.0 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : // @generated by torchgen/gen.py from Function.h
       4             : 
       5             : #include <ATen/Context.h>
       6             : #include <ATen/DeviceGuard.h>
       7             : #include <ATen/TensorUtils.h>
       8             : #include <ATen/TracerMode.h>
       9             : #include <ATen/core/Generator.h>
      10             : #include <ATen/core/Reduction.h>
      11             : #include <ATen/core/Tensor.h>
      12             : #include <c10/core/Scalar.h>
      13             : #include <c10/core/Storage.h>
      14             : #include <c10/core/TensorOptions.h>
      15             : #include <c10/util/Deprecated.h>
      16             : #include <optional>
      17             : #include <string_view>
      18             : 
      19             : 
      20             : 
      21             : #include <ATen/ops/eye_ops.h>
      22             : 
      23             : namespace at {
      24             : 
      25             : 
      26             : // aten::eye(SymInt n, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
      27           7 : inline at::Tensor eye(int64_t n, at::TensorOptions options={}) {
      28          14 :     return at::_ops::eye::call(n, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
      29             : }
      30             : namespace symint {
      31             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
      32             :   at::Tensor eye(int64_t n, at::TensorOptions options={}) {
      33             :     return at::_ops::eye::call(n, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
      34             :   }
      35             : }
      36             : 
      37             : // aten::eye(SymInt n, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
      38             : inline at::Tensor eye(int64_t n, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory) {
      39             :     return at::_ops::eye::call(n, dtype, layout, device, pin_memory);
      40             : }
      41             : namespace symint {
      42             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
      43             :   at::Tensor eye(int64_t n, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory) {
      44             :     return at::_ops::eye::call(n, dtype, layout, device, pin_memory);
      45             :   }
      46             : }
      47             : 
      48             : // aten::eye(SymInt n, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
      49             : inline at::Tensor eye_symint(c10::SymInt n, at::TensorOptions options={}) {
      50             :     return at::_ops::eye::call(n, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
      51             : }
      52             : namespace symint {
      53             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
      54             :   at::Tensor eye(c10::SymInt n, at::TensorOptions options={}) {
      55             :     return at::_ops::eye::call(n, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
      56             :   }
      57             : }
      58             : 
      59             : // aten::eye(SymInt n, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
      60             : inline at::Tensor eye_symint(c10::SymInt n, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory) {
      61             :     return at::_ops::eye::call(n, dtype, layout, device, pin_memory);
      62             : }
      63             : namespace symint {
      64             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
      65             :   at::Tensor eye(c10::SymInt n, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory) {
      66             :     return at::_ops::eye::call(n, dtype, layout, device, pin_memory);
      67             :   }
      68             : }
      69             : 
      70             : // aten::eye.m(SymInt n, SymInt m, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
      71             : inline at::Tensor eye(int64_t n, int64_t m, at::TensorOptions options={}) {
      72             :     return at::_ops::eye_m::call(n, m, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
      73             : }
      74             : namespace symint {
      75             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
      76             :   at::Tensor eye(int64_t n, int64_t m, at::TensorOptions options={}) {
      77             :     return at::_ops::eye_m::call(n, m, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
      78             :   }
      79             : }
      80             : 
      81             : // aten::eye.m(SymInt n, SymInt m, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
      82             : inline at::Tensor eye(int64_t n, int64_t m, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory) {
      83             :     return at::_ops::eye_m::call(n, m, dtype, layout, device, pin_memory);
      84             : }
      85             : namespace symint {
      86             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
      87             :   at::Tensor eye(int64_t n, int64_t m, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory) {
      88             :     return at::_ops::eye_m::call(n, m, dtype, layout, device, pin_memory);
      89             :   }
      90             : }
      91             : 
      92             : // aten::eye.m(SymInt n, SymInt m, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
      93             : inline at::Tensor eye_symint(c10::SymInt n, c10::SymInt m, at::TensorOptions options={}) {
      94             :     return at::_ops::eye_m::call(n, m, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
      95             : }
      96             : namespace symint {
      97             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
      98             :   at::Tensor eye(c10::SymInt n, c10::SymInt m, at::TensorOptions options={}) {
      99             :     return at::_ops::eye_m::call(n, m, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
     100             :   }
     101             : }
     102             : 
     103             : // aten::eye.m(SymInt n, SymInt m, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
     104             : inline at::Tensor eye_symint(c10::SymInt n, c10::SymInt m, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory) {
     105             :     return at::_ops::eye_m::call(n, m, dtype, layout, device, pin_memory);
     106             : }
     107             : namespace symint {
     108             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
     109             :   at::Tensor eye(c10::SymInt n, c10::SymInt m, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory) {
     110             :     return at::_ops::eye_m::call(n, m, dtype, layout, device, pin_memory);
     111             :   }
     112             : }
     113             : 
     114             : // aten::eye.out(SymInt n, *, Tensor(a!) out) -> Tensor(a!)
     115             : inline at::Tensor & eye_out(at::Tensor & out, int64_t n) {
     116             :     return at::_ops::eye_out::call(n, out);
     117             : }
     118             : namespace symint {
     119             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
     120             :   at::Tensor & eye_out(at::Tensor & out, int64_t n) {
     121             :     return at::_ops::eye_out::call(n, out);
     122             :   }
     123             : }
     124             : 
     125             : // aten::eye.out(SymInt n, *, Tensor(a!) out) -> Tensor(a!)
     126             : inline at::Tensor & eye_outf(int64_t n, at::Tensor & out) {
     127             :     return at::_ops::eye_out::call(n, out);
     128             : }
     129             : namespace symint {
     130             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
     131             :   at::Tensor & eye_outf(int64_t n, at::Tensor & out) {
     132             :     return at::_ops::eye_out::call(n, out);
     133             :   }
     134             : }
     135             : 
     136             : // aten::eye.out(SymInt n, *, Tensor(a!) out) -> Tensor(a!)
     137             : inline at::Tensor & eye_symint_out(at::Tensor & out, c10::SymInt n) {
     138             :     return at::_ops::eye_out::call(n, out);
     139             : }
     140             : namespace symint {
     141             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
     142             :   at::Tensor & eye_out(at::Tensor & out, c10::SymInt n) {
     143             :     return at::_ops::eye_out::call(n, out);
     144             :   }
     145             : }
     146             : 
     147             : // aten::eye.out(SymInt n, *, Tensor(a!) out) -> Tensor(a!)
     148             : inline at::Tensor & eye_symint_outf(c10::SymInt n, at::Tensor & out) {
     149             :     return at::_ops::eye_out::call(n, out);
     150             : }
     151             : namespace symint {
     152             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
     153             :   at::Tensor & eye_outf(c10::SymInt n, at::Tensor & out) {
     154             :     return at::_ops::eye_out::call(n, out);
     155             :   }
     156             : }
     157             : 
     158             : // aten::eye.m_out(SymInt n, SymInt m, *, Tensor(a!) out) -> Tensor(a!)
     159             : inline at::Tensor & eye_out(at::Tensor & out, int64_t n, int64_t m) {
     160             :     return at::_ops::eye_m_out::call(n, m, out);
     161             : }
     162             : namespace symint {
     163             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
     164             :   at::Tensor & eye_out(at::Tensor & out, int64_t n, int64_t m) {
     165             :     return at::_ops::eye_m_out::call(n, m, out);
     166             :   }
     167             : }
     168             : 
     169             : // aten::eye.m_out(SymInt n, SymInt m, *, Tensor(a!) out) -> Tensor(a!)
     170             : inline at::Tensor & eye_outf(int64_t n, int64_t m, at::Tensor & out) {
     171             :     return at::_ops::eye_m_out::call(n, m, out);
     172             : }
     173             : namespace symint {
     174             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
     175             :   at::Tensor & eye_outf(int64_t n, int64_t m, at::Tensor & out) {
     176             :     return at::_ops::eye_m_out::call(n, m, out);
     177             :   }
     178             : }
     179             : 
     180             : // aten::eye.m_out(SymInt n, SymInt m, *, Tensor(a!) out) -> Tensor(a!)
     181             : inline at::Tensor & eye_symint_out(at::Tensor & out, c10::SymInt n, c10::SymInt m) {
     182             :     return at::_ops::eye_m_out::call(n, m, out);
     183             : }
     184             : namespace symint {
     185             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
     186             :   at::Tensor & eye_out(at::Tensor & out, c10::SymInt n, c10::SymInt m) {
     187             :     return at::_ops::eye_m_out::call(n, m, out);
     188             :   }
     189             : }
     190             : 
     191             : // aten::eye.m_out(SymInt n, SymInt m, *, Tensor(a!) out) -> Tensor(a!)
     192             : inline at::Tensor & eye_symint_outf(c10::SymInt n, c10::SymInt m, at::Tensor & out) {
     193             :     return at::_ops::eye_m_out::call(n, m, out);
     194             : }
     195             : namespace symint {
     196             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
     197             :   at::Tensor & eye_outf(c10::SymInt n, c10::SymInt m, at::Tensor & out) {
     198             :     return at::_ops::eye_m_out::call(n, m, out);
     199             :   }
     200             : }
     201             : 
     202             : }

Generated by: LCOV version 1.16