constant_pad_nd.h 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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/constant_pad_nd_ops.h>
  16. namespace at {
  17. // aten::constant_pad_nd(Tensor self, SymInt[] pad, Scalar value=0) -> Tensor
  18. inline at::Tensor constant_pad_nd(const at::Tensor & self, at::IntArrayRef pad, const at::Scalar & value=0) {
  19. return at::_ops::constant_pad_nd::call(self, c10::fromIntArrayRefSlow(pad), value);
  20. }
  21. namespace symint {
  22. template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
  23. at::Tensor constant_pad_nd(const at::Tensor & self, at::IntArrayRef pad, const at::Scalar & value=0) {
  24. return at::_ops::constant_pad_nd::call(self, c10::fromIntArrayRefSlow(pad), value);
  25. }
  26. }
  27. // aten::constant_pad_nd(Tensor self, SymInt[] pad, Scalar value=0) -> Tensor
  28. inline at::Tensor constant_pad_nd_symint(const at::Tensor & self, c10::SymIntArrayRef pad, const at::Scalar & value=0) {
  29. return at::_ops::constant_pad_nd::call(self, pad, value);
  30. }
  31. namespace symint {
  32. template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
  33. at::Tensor constant_pad_nd(const at::Tensor & self, c10::SymIntArrayRef pad, const at::Scalar & value=0) {
  34. return at::_ops::constant_pad_nd::call(self, pad, value);
  35. }
  36. }
  37. // aten::constant_pad_nd.out(Tensor self, SymInt[] pad, Scalar value=0, *, Tensor(a!) out) -> Tensor(a!)
  38. inline at::Tensor & constant_pad_nd_out(at::Tensor & out, const at::Tensor & self, at::IntArrayRef pad, const at::Scalar & value=0) {
  39. return at::_ops::constant_pad_nd_out::call(self, c10::fromIntArrayRefSlow(pad), value, out);
  40. }
  41. namespace symint {
  42. template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
  43. at::Tensor & constant_pad_nd_out(at::Tensor & out, const at::Tensor & self, at::IntArrayRef pad, const at::Scalar & value=0) {
  44. return at::_ops::constant_pad_nd_out::call(self, c10::fromIntArrayRefSlow(pad), value, out);
  45. }
  46. }
  47. // aten::constant_pad_nd.out(Tensor self, SymInt[] pad, Scalar value=0, *, Tensor(a!) out) -> Tensor(a!)
  48. inline at::Tensor & constant_pad_nd_outf(const at::Tensor & self, at::IntArrayRef pad, const at::Scalar & value, at::Tensor & out) {
  49. return at::_ops::constant_pad_nd_out::call(self, c10::fromIntArrayRefSlow(pad), value, out);
  50. }
  51. namespace symint {
  52. template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
  53. at::Tensor & constant_pad_nd_outf(const at::Tensor & self, at::IntArrayRef pad, const at::Scalar & value, at::Tensor & out) {
  54. return at::_ops::constant_pad_nd_out::call(self, c10::fromIntArrayRefSlow(pad), value, out);
  55. }
  56. }
  57. // aten::constant_pad_nd.out(Tensor self, SymInt[] pad, Scalar value=0, *, Tensor(a!) out) -> Tensor(a!)
  58. inline at::Tensor & constant_pad_nd_symint_out(at::Tensor & out, const at::Tensor & self, c10::SymIntArrayRef pad, const at::Scalar & value=0) {
  59. return at::_ops::constant_pad_nd_out::call(self, pad, value, out);
  60. }
  61. namespace symint {
  62. template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
  63. at::Tensor & constant_pad_nd_out(at::Tensor & out, const at::Tensor & self, c10::SymIntArrayRef pad, const at::Scalar & value=0) {
  64. return at::_ops::constant_pad_nd_out::call(self, pad, value, out);
  65. }
  66. }
  67. // aten::constant_pad_nd.out(Tensor self, SymInt[] pad, Scalar value=0, *, Tensor(a!) out) -> Tensor(a!)
  68. inline at::Tensor & constant_pad_nd_symint_outf(const at::Tensor & self, c10::SymIntArrayRef pad, const at::Scalar & value, at::Tensor & out) {
  69. return at::_ops::constant_pad_nd_out::call(self, pad, value, out);
  70. }
  71. namespace symint {
  72. template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
  73. at::Tensor & constant_pad_nd_outf(const at::Tensor & self, c10::SymIntArrayRef pad, const at::Scalar & value, at::Tensor & out) {
  74. return at::_ops::constant_pad_nd_out::call(self, pad, value, out);
  75. }
  76. }
  77. }