LCOV - code coverage report
Current view: top level - home/runner/.local/lib/python3.9/site-packages/torch/include/ATen/ops - empty.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/empty_ops.h>
      22             : 
      23             : namespace at {
      24             : 
      25             : 
      26             : // aten::empty.names(int[] size, *, Dimname[]? names, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
      27             : inline at::Tensor empty(at::IntArrayRef size, ::std::optional<at::DimnameList> names, at::TensorOptions options={}, ::std::optional<at::MemoryFormat> memory_format=::std::nullopt) {
      28             :     return at::_ops::empty_names::call(size, names, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt(), c10::impl::check_tensor_options_and_extract_memory_format(options, memory_format));
      29             : }
      30             : // aten::empty.names(int[] size, *, Dimname[]? names, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
      31             : inline at::Tensor empty(at::IntArrayRef size, ::std::optional<at::DimnameList> names, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory, ::std::optional<at::MemoryFormat> memory_format) {
      32             :     return at::_ops::empty_names::call(size, names, dtype, layout, device, pin_memory, memory_format);
      33             : }
      34             : 
      35             : // aten::empty.memory_format(SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
      36          38 : inline at::Tensor empty(at::IntArrayRef size, at::TensorOptions options={}, ::std::optional<at::MemoryFormat> memory_format=::std::nullopt) {
      37          76 :     return at::_ops::empty_memory_format::call(c10::fromIntArrayRefSlow(size), c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt(), c10::impl::check_tensor_options_and_extract_memory_format(options, memory_format));
      38             : }
      39             : namespace symint {
      40             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
      41             :   at::Tensor empty(at::IntArrayRef size, at::TensorOptions options={}, ::std::optional<at::MemoryFormat> memory_format=::std::nullopt) {
      42             :     return at::_ops::empty_memory_format::call(c10::fromIntArrayRefSlow(size), c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt(), c10::impl::check_tensor_options_and_extract_memory_format(options, memory_format));
      43             :   }
      44             : }
      45             : 
      46             : // aten::empty.memory_format(SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
      47             : inline at::Tensor empty(at::IntArrayRef size, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory, ::std::optional<at::MemoryFormat> memory_format) {
      48             :     return at::_ops::empty_memory_format::call(c10::fromIntArrayRefSlow(size), dtype, layout, device, pin_memory, memory_format);
      49             : }
      50             : namespace symint {
      51             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
      52             :   at::Tensor empty(at::IntArrayRef size, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory, ::std::optional<at::MemoryFormat> memory_format) {
      53             :     return at::_ops::empty_memory_format::call(c10::fromIntArrayRefSlow(size), dtype, layout, device, pin_memory, memory_format);
      54             :   }
      55             : }
      56             : 
      57             : // aten::empty.memory_format(SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
      58             : inline at::Tensor empty_symint(c10::SymIntArrayRef size, at::TensorOptions options={}, ::std::optional<at::MemoryFormat> memory_format=::std::nullopt) {
      59             :     return at::_ops::empty_memory_format::call(size, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt(), c10::impl::check_tensor_options_and_extract_memory_format(options, memory_format));
      60             : }
      61             : namespace symint {
      62             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
      63             :   at::Tensor empty(c10::SymIntArrayRef size, at::TensorOptions options={}, ::std::optional<at::MemoryFormat> memory_format=::std::nullopt) {
      64             :     return at::_ops::empty_memory_format::call(size, c10::optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt(), c10::impl::check_tensor_options_and_extract_memory_format(options, memory_format));
      65             :   }
      66             : }
      67             : 
      68             : // aten::empty.memory_format(SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor
      69             : inline at::Tensor empty_symint(c10::SymIntArrayRef size, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory, ::std::optional<at::MemoryFormat> memory_format) {
      70             :     return at::_ops::empty_memory_format::call(size, dtype, layout, device, pin_memory, memory_format);
      71             : }
      72             : namespace symint {
      73             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
      74             :   at::Tensor empty(c10::SymIntArrayRef size, ::std::optional<at::ScalarType> dtype, ::std::optional<at::Layout> layout, ::std::optional<at::Device> device, ::std::optional<bool> pin_memory, ::std::optional<at::MemoryFormat> memory_format) {
      75             :     return at::_ops::empty_memory_format::call(size, dtype, layout, device, pin_memory, memory_format);
      76             :   }
      77             : }
      78             : 
      79             : // aten::empty.out(SymInt[] size, *, MemoryFormat? memory_format=None, Tensor(a!) out) -> Tensor(a!)
      80             : inline at::Tensor & empty_out(at::Tensor & out, at::IntArrayRef size, ::std::optional<at::MemoryFormat> memory_format=::std::nullopt) {
      81             :     return at::_ops::empty_out::call(c10::fromIntArrayRefSlow(size), memory_format, out);
      82             : }
      83             : namespace symint {
      84             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
      85             :   at::Tensor & empty_out(at::Tensor & out, at::IntArrayRef size, ::std::optional<at::MemoryFormat> memory_format=::std::nullopt) {
      86             :     return at::_ops::empty_out::call(c10::fromIntArrayRefSlow(size), memory_format, out);
      87             :   }
      88             : }
      89             : 
      90             : // aten::empty.out(SymInt[] size, *, MemoryFormat? memory_format=None, Tensor(a!) out) -> Tensor(a!)
      91             : inline at::Tensor & empty_outf(at::IntArrayRef size, ::std::optional<at::MemoryFormat> memory_format, at::Tensor & out) {
      92             :     return at::_ops::empty_out::call(c10::fromIntArrayRefSlow(size), memory_format, out);
      93             : }
      94             : namespace symint {
      95             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, int64_t>>>
      96             :   at::Tensor & empty_outf(at::IntArrayRef size, ::std::optional<at::MemoryFormat> memory_format, at::Tensor & out) {
      97             :     return at::_ops::empty_out::call(c10::fromIntArrayRefSlow(size), memory_format, out);
      98             :   }
      99             : }
     100             : 
     101             : // aten::empty.out(SymInt[] size, *, MemoryFormat? memory_format=None, Tensor(a!) out) -> Tensor(a!)
     102             : inline at::Tensor & empty_symint_out(at::Tensor & out, c10::SymIntArrayRef size, ::std::optional<at::MemoryFormat> memory_format=::std::nullopt) {
     103             :     return at::_ops::empty_out::call(size, memory_format, out);
     104             : }
     105             : namespace symint {
     106             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
     107             :   at::Tensor & empty_out(at::Tensor & out, c10::SymIntArrayRef size, ::std::optional<at::MemoryFormat> memory_format=::std::nullopt) {
     108             :     return at::_ops::empty_out::call(size, memory_format, out);
     109             :   }
     110             : }
     111             : 
     112             : // aten::empty.out(SymInt[] size, *, MemoryFormat? memory_format=None, Tensor(a!) out) -> Tensor(a!)
     113             : inline at::Tensor & empty_symint_outf(c10::SymIntArrayRef size, ::std::optional<at::MemoryFormat> memory_format, at::Tensor & out) {
     114             :     return at::_ops::empty_out::call(size, memory_format, out);
     115             : }
     116             : namespace symint {
     117             :   template <typename T, typename = std::enable_if_t<std::is_same_v<T, c10::SymInt>>>
     118             :   at::Tensor & empty_outf(c10::SymIntArrayRef size, ::std::optional<at::MemoryFormat> memory_format, at::Tensor & out) {
     119             :     return at::_ops::empty_out::call(size, memory_format, out);
     120             :   }
     121             : }
     122             : 
     123             : // aten::empty.names_out(int[] size, *, Dimname[]? names, MemoryFormat? memory_format=None, Tensor(a!) out) -> Tensor(a!)
     124             : inline at::Tensor & empty_out(at::Tensor & out, at::IntArrayRef size, ::std::optional<at::DimnameList> names, ::std::optional<at::MemoryFormat> memory_format=::std::nullopt) {
     125             :     return at::_ops::empty_names_out::call(size, names, memory_format, out);
     126             : }
     127             : // aten::empty.names_out(int[] size, *, Dimname[]? names, MemoryFormat? memory_format=None, Tensor(a!) out) -> Tensor(a!)
     128             : inline at::Tensor & empty_outf(at::IntArrayRef size, ::std::optional<at::DimnameList> names, ::std::optional<at::MemoryFormat> memory_format, at::Tensor & out) {
     129             :     return at::_ops::empty_names_out::call(size, names, memory_format, out);
     130             : }
     131             : 
     132             : }

Generated by: LCOV version 1.16