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