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