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/slice_scatter_ops.h> |
21 | |
22 | namespace at { |
23 | |
24 | |
25 | // aten::slice_scatter(Tensor self, Tensor src, int dim=0, SymInt? start=None, SymInt? end=None, SymInt step=1) -> Tensor |
26 | inline at::Tensor slice_scatter(const at::Tensor & self, const at::Tensor & src, int64_t dim=0, c10::optional<int64_t> start=c10::nullopt, c10::optional<int64_t> end=c10::nullopt, int64_t step=1) { |
27 | return at::_ops::slice_scatter::call(self, src, dim, start.has_value() ? c10::make_optional(c10::SymInt(*start)) : c10::nullopt, end.has_value() ? c10::make_optional(c10::SymInt(*end)) : c10::nullopt, step); |
28 | } |
29 | namespace symint { |
30 | template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>> |
31 | at::Tensor slice_scatter(const at::Tensor & self, const at::Tensor & src, int64_t dim=0, c10::optional<int64_t> start=c10::nullopt, c10::optional<int64_t> end=c10::nullopt, int64_t step=1) { |
32 | return at::_ops::slice_scatter::call(self, src, dim, start.has_value() ? c10::make_optional(c10::SymInt(*start)) : c10::nullopt, end.has_value() ? c10::make_optional(c10::SymInt(*end)) : c10::nullopt, step); |
33 | } |
34 | } |
35 | |
36 | // aten::slice_scatter(Tensor self, Tensor src, int dim=0, SymInt? start=None, SymInt? end=None, SymInt step=1) -> Tensor |
37 | inline at::Tensor slice_scatter_symint(const at::Tensor & self, const at::Tensor & src, int64_t dim=0, c10::optional<c10::SymInt> start=c10::nullopt, c10::optional<c10::SymInt> end=c10::nullopt, c10::SymInt step=1) { |
38 | return at::_ops::slice_scatter::call(self, src, dim, start, end, step); |
39 | } |
40 | namespace symint { |
41 | template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>> |
42 | at::Tensor slice_scatter(const at::Tensor & self, const at::Tensor & src, int64_t dim=0, c10::optional<c10::SymInt> start=c10::nullopt, c10::optional<c10::SymInt> end=c10::nullopt, c10::SymInt step=1) { |
43 | return at::_ops::slice_scatter::call(self, src, dim, start, end, step); |
44 | } |
45 | } |
46 | |
47 | // aten::slice_scatter.out(Tensor self, Tensor src, int dim=0, SymInt? start=None, SymInt? end=None, SymInt step=1, *, Tensor(a!) out) -> Tensor(a!) |
48 | inline at::Tensor & slice_scatter_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & src, int64_t dim=0, c10::optional<int64_t> start=c10::nullopt, c10::optional<int64_t> end=c10::nullopt, int64_t step=1) { |
49 | return at::_ops::slice_scatter_out::call(self, src, dim, start.has_value() ? c10::make_optional(c10::SymInt(*start)) : c10::nullopt, end.has_value() ? c10::make_optional(c10::SymInt(*end)) : c10::nullopt, step, out); |
50 | } |
51 | namespace symint { |
52 | template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>> |
53 | at::Tensor & slice_scatter_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & src, int64_t dim=0, c10::optional<int64_t> start=c10::nullopt, c10::optional<int64_t> end=c10::nullopt, int64_t step=1) { |
54 | return at::_ops::slice_scatter_out::call(self, src, dim, start.has_value() ? c10::make_optional(c10::SymInt(*start)) : c10::nullopt, end.has_value() ? c10::make_optional(c10::SymInt(*end)) : c10::nullopt, step, out); |
55 | } |
56 | } |
57 | |
58 | // aten::slice_scatter.out(Tensor self, Tensor src, int dim=0, SymInt? start=None, SymInt? end=None, SymInt step=1, *, Tensor(a!) out) -> Tensor(a!) |
59 | inline at::Tensor & slice_scatter_outf(const at::Tensor & self, const at::Tensor & src, int64_t dim, c10::optional<int64_t> start, c10::optional<int64_t> end, int64_t step, at::Tensor & out) { |
60 | return at::_ops::slice_scatter_out::call(self, src, dim, start.has_value() ? c10::make_optional(c10::SymInt(*start)) : c10::nullopt, end.has_value() ? c10::make_optional(c10::SymInt(*end)) : c10::nullopt, step, out); |
61 | } |
62 | namespace symint { |
63 | template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>> |
64 | at::Tensor & slice_scatter_outf(const at::Tensor & self, const at::Tensor & src, int64_t dim, c10::optional<int64_t> start, c10::optional<int64_t> end, int64_t step, at::Tensor & out) { |
65 | return at::_ops::slice_scatter_out::call(self, src, dim, start.has_value() ? c10::make_optional(c10::SymInt(*start)) : c10::nullopt, end.has_value() ? c10::make_optional(c10::SymInt(*end)) : c10::nullopt, step, out); |
66 | } |
67 | } |
68 | |
69 | // aten::slice_scatter.out(Tensor self, Tensor src, int dim=0, SymInt? start=None, SymInt? end=None, SymInt step=1, *, Tensor(a!) out) -> Tensor(a!) |
70 | inline at::Tensor & slice_scatter_symint_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & src, int64_t dim=0, c10::optional<c10::SymInt> start=c10::nullopt, c10::optional<c10::SymInt> end=c10::nullopt, c10::SymInt step=1) { |
71 | return at::_ops::slice_scatter_out::call(self, src, dim, start, end, step, out); |
72 | } |
73 | namespace symint { |
74 | template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>> |
75 | at::Tensor & slice_scatter_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & src, int64_t dim=0, c10::optional<c10::SymInt> start=c10::nullopt, c10::optional<c10::SymInt> end=c10::nullopt, c10::SymInt step=1) { |
76 | return at::_ops::slice_scatter_out::call(self, src, dim, start, end, step, out); |
77 | } |
78 | } |
79 | |
80 | // aten::slice_scatter.out(Tensor self, Tensor src, int dim=0, SymInt? start=None, SymInt? end=None, SymInt step=1, *, Tensor(a!) out) -> Tensor(a!) |
81 | inline at::Tensor & slice_scatter_symint_outf(const at::Tensor & self, const at::Tensor & src, int64_t dim, c10::optional<c10::SymInt> start, c10::optional<c10::SymInt> end, c10::SymInt step, at::Tensor & out) { |
82 | return at::_ops::slice_scatter_out::call(self, src, dim, start, end, step, out); |
83 | } |
84 | namespace symint { |
85 | template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>> |
86 | at::Tensor & slice_scatter_outf(const at::Tensor & self, const at::Tensor & src, int64_t dim, c10::optional<c10::SymInt> start, c10::optional<c10::SymInt> end, c10::SymInt step, at::Tensor & out) { |
87 | return at::_ops::slice_scatter_out::call(self, src, dim, start, end, step, out); |
88 | } |
89 | } |
90 | |
91 | } |
92 | |