set.h 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. #pragma once
  2. // @generated by torchgen/gen.py from Function.h
  3. #include <ATen/Context.h>
  4. #include <ATen/DeviceGuard.h>
  5. #include <ATen/TensorUtils.h>
  6. #include <ATen/TracerMode.h>
  7. #include <ATen/core/Generator.h>
  8. #include <ATen/core/Reduction.h>
  9. #include <ATen/core/Tensor.h>
  10. #include <c10/core/Scalar.h>
  11. #include <c10/core/Storage.h>
  12. #include <c10/core/TensorOptions.h>
  13. #include <c10/util/Deprecated.h>
  14. #include <c10/util/Optional.h>
  15. #include <ATen/ops/set_ops.h>
  16. namespace at {
  17. namespace symint {
  18. template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
  19. at::Tensor & set_(at::Tensor & self, at::Storage source, int64_t storage_offset, at::IntArrayRef size, at::IntArrayRef stride={}) {
  20. return at::_ops::set__source_Storage_storage_offset::call(self, source, storage_offset, c10::fromIntArrayRefSlow(size), c10::fromIntArrayRefSlow(stride));
  21. }
  22. }
  23. namespace symint {
  24. template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
  25. at::Tensor & set_(at::Tensor & self, at::Storage source, c10::SymInt storage_offset, c10::SymIntArrayRef size, c10::SymIntArrayRef stride={}) {
  26. return at::_ops::set__source_Storage_storage_offset::call(self, source, storage_offset, size, stride);
  27. }
  28. }
  29. namespace symint {
  30. template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
  31. at::Tensor & set_(at::Tensor & self, const at::Tensor & source, int64_t storage_offset, at::IntArrayRef size, at::IntArrayRef stride={}) {
  32. return at::_ops::set__source_Tensor_storage_offset::call(self, source, storage_offset, c10::fromIntArrayRefSlow(size), c10::fromIntArrayRefSlow(stride));
  33. }
  34. }
  35. namespace symint {
  36. template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
  37. at::Tensor & set_(at::Tensor & self, const at::Tensor & source, c10::SymInt storage_offset, c10::SymIntArrayRef size, c10::SymIntArrayRef stride={}) {
  38. return at::_ops::set__source_Tensor_storage_offset::call(self, source, storage_offset, size, stride);
  39. }
  40. }
  41. // aten::set.source_Storage_out(Tensor self, Storage source, *, Tensor(a!) out) -> Tensor(a!)
  42. inline at::Tensor & set_out(at::Tensor & out, const at::Tensor & self, at::Storage source) {
  43. return at::_ops::set_source_Storage_out::call(self, source, out);
  44. }
  45. // aten::set.source_Storage_out(Tensor self, Storage source, *, Tensor(a!) out) -> Tensor(a!)
  46. inline at::Tensor & set_outf(const at::Tensor & self, at::Storage source, at::Tensor & out) {
  47. return at::_ops::set_source_Storage_out::call(self, source, out);
  48. }
  49. // aten::set.source_Storage(Tensor self, Storage source) -> Tensor
  50. inline at::Tensor set(const at::Tensor & self, at::Storage source) {
  51. return at::_ops::set_source_Storage::call(self, source);
  52. }
  53. // aten::set.source_Storage_storage_offset_out(Tensor self, Storage source, SymInt storage_offset, SymInt[] size, SymInt[] stride=[], *, Tensor(a!) out) -> Tensor(a!)
  54. inline at::Tensor & set_out(at::Tensor & out, const at::Tensor & self, at::Storage source, int64_t storage_offset, at::IntArrayRef size, at::IntArrayRef stride={}) {
  55. return at::_ops::set_source_Storage_storage_offset_out::call(self, source, storage_offset, c10::fromIntArrayRefSlow(size), c10::fromIntArrayRefSlow(stride), out);
  56. }
  57. namespace symint {
  58. template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
  59. at::Tensor & set_out(at::Tensor & out, const at::Tensor & self, at::Storage source, int64_t storage_offset, at::IntArrayRef size, at::IntArrayRef stride={}) {
  60. return at::_ops::set_source_Storage_storage_offset_out::call(self, source, storage_offset, c10::fromIntArrayRefSlow(size), c10::fromIntArrayRefSlow(stride), out);
  61. }
  62. }
  63. // aten::set.source_Storage_storage_offset_out(Tensor self, Storage source, SymInt storage_offset, SymInt[] size, SymInt[] stride=[], *, Tensor(a!) out) -> Tensor(a!)
  64. inline at::Tensor & set_outf(const at::Tensor & self, at::Storage source, int64_t storage_offset, at::IntArrayRef size, at::IntArrayRef stride, at::Tensor & out) {
  65. return at::_ops::set_source_Storage_storage_offset_out::call(self, source, storage_offset, c10::fromIntArrayRefSlow(size), c10::fromIntArrayRefSlow(stride), out);
  66. }
  67. namespace symint {
  68. template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
  69. at::Tensor & set_outf(const at::Tensor & self, at::Storage source, int64_t storage_offset, at::IntArrayRef size, at::IntArrayRef stride, at::Tensor & out) {
  70. return at::_ops::set_source_Storage_storage_offset_out::call(self, source, storage_offset, c10::fromIntArrayRefSlow(size), c10::fromIntArrayRefSlow(stride), out);
  71. }
  72. }
  73. // aten::set.source_Storage_storage_offset_out(Tensor self, Storage source, SymInt storage_offset, SymInt[] size, SymInt[] stride=[], *, Tensor(a!) out) -> Tensor(a!)
  74. inline at::Tensor & set_symint_out(at::Tensor & out, const at::Tensor & self, at::Storage source, c10::SymInt storage_offset, c10::SymIntArrayRef size, c10::SymIntArrayRef stride={}) {
  75. return at::_ops::set_source_Storage_storage_offset_out::call(self, source, storage_offset, size, stride, out);
  76. }
  77. namespace symint {
  78. template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
  79. at::Tensor & set_out(at::Tensor & out, const at::Tensor & self, at::Storage source, c10::SymInt storage_offset, c10::SymIntArrayRef size, c10::SymIntArrayRef stride={}) {
  80. return at::_ops::set_source_Storage_storage_offset_out::call(self, source, storage_offset, size, stride, out);
  81. }
  82. }
  83. // aten::set.source_Storage_storage_offset_out(Tensor self, Storage source, SymInt storage_offset, SymInt[] size, SymInt[] stride=[], *, Tensor(a!) out) -> Tensor(a!)
  84. inline at::Tensor & set_symint_outf(const at::Tensor & self, at::Storage source, c10::SymInt storage_offset, c10::SymIntArrayRef size, c10::SymIntArrayRef stride, at::Tensor & out) {
  85. return at::_ops::set_source_Storage_storage_offset_out::call(self, source, storage_offset, size, stride, out);
  86. }
  87. namespace symint {
  88. template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
  89. at::Tensor & set_outf(const at::Tensor & self, at::Storage source, c10::SymInt storage_offset, c10::SymIntArrayRef size, c10::SymIntArrayRef stride, at::Tensor & out) {
  90. return at::_ops::set_source_Storage_storage_offset_out::call(self, source, storage_offset, size, stride, out);
  91. }
  92. }
  93. // aten::set.source_Storage_storage_offset(Tensor self, Storage source, SymInt storage_offset, SymInt[] size, SymInt[] stride=[]) -> Tensor
  94. inline at::Tensor set(const at::Tensor & self, at::Storage source, int64_t storage_offset, at::IntArrayRef size, at::IntArrayRef stride={}) {
  95. return at::_ops::set_source_Storage_storage_offset::call(self, source, storage_offset, c10::fromIntArrayRefSlow(size), c10::fromIntArrayRefSlow(stride));
  96. }
  97. namespace symint {
  98. template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
  99. at::Tensor set(const at::Tensor & self, at::Storage source, int64_t storage_offset, at::IntArrayRef size, at::IntArrayRef stride={}) {
  100. return at::_ops::set_source_Storage_storage_offset::call(self, source, storage_offset, c10::fromIntArrayRefSlow(size), c10::fromIntArrayRefSlow(stride));
  101. }
  102. }
  103. // aten::set.source_Storage_storage_offset(Tensor self, Storage source, SymInt storage_offset, SymInt[] size, SymInt[] stride=[]) -> Tensor
  104. inline at::Tensor set_symint(const at::Tensor & self, at::Storage source, c10::SymInt storage_offset, c10::SymIntArrayRef size, c10::SymIntArrayRef stride={}) {
  105. return at::_ops::set_source_Storage_storage_offset::call(self, source, storage_offset, size, stride);
  106. }
  107. namespace symint {
  108. template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
  109. at::Tensor set(const at::Tensor & self, at::Storage source, c10::SymInt storage_offset, c10::SymIntArrayRef size, c10::SymIntArrayRef stride={}) {
  110. return at::_ops::set_source_Storage_storage_offset::call(self, source, storage_offset, size, stride);
  111. }
  112. }
  113. // aten::set.source_Tensor_out(Tensor self, Tensor source, *, Tensor(a!) out) -> Tensor(a!)
  114. inline at::Tensor & set_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & source) {
  115. return at::_ops::set_source_Tensor_out::call(self, source, out);
  116. }
  117. // aten::set.source_Tensor_out(Tensor self, Tensor source, *, Tensor(a!) out) -> Tensor(a!)
  118. inline at::Tensor & set_outf(const at::Tensor & self, const at::Tensor & source, at::Tensor & out) {
  119. return at::_ops::set_source_Tensor_out::call(self, source, out);
  120. }
  121. // aten::set.source_Tensor(Tensor self, Tensor source) -> Tensor
  122. inline at::Tensor set(const at::Tensor & self, const at::Tensor & source) {
  123. return at::_ops::set_source_Tensor::call(self, source);
  124. }
  125. // aten::set.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
  126. inline at::Tensor & set_out(at::Tensor & out, const at::Tensor & self) {
  127. return at::_ops::set_out::call(self, out);
  128. }
  129. // aten::set.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
  130. inline at::Tensor & set_outf(const at::Tensor & self, at::Tensor & out) {
  131. return at::_ops::set_out::call(self, out);
  132. }
  133. // aten::set(Tensor self) -> Tensor
  134. inline at::Tensor set(const at::Tensor & self) {
  135. return at::_ops::set::call(self);
  136. }
  137. }