normal.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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/normal_ops.h>
  16. namespace at {
  17. // aten::normal_functional(Tensor self, float mean=0, float std=1, *, Generator? generator=None) -> Tensor
  18. inline at::Tensor normal_functional(const at::Tensor & self, double mean=0, double std=1, c10::optional<at::Generator> generator=c10::nullopt) {
  19. return at::_ops::normal_functional::call(self, mean, std, generator);
  20. }
  21. // aten::normal.Tensor_float_out(Tensor mean, float std=1, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!)
  22. inline at::Tensor & normal_out(at::Tensor & out, const at::Tensor & mean, double std=1, c10::optional<at::Generator> generator=c10::nullopt) {
  23. return at::_ops::normal_Tensor_float_out::call(mean, std, generator, out);
  24. }
  25. // aten::normal.Tensor_float_out(Tensor mean, float std=1, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!)
  26. inline at::Tensor & normal_outf(const at::Tensor & mean, double std, c10::optional<at::Generator> generator, at::Tensor & out) {
  27. return at::_ops::normal_Tensor_float_out::call(mean, std, generator, out);
  28. }
  29. // aten::normal.Tensor_float(Tensor mean, float std=1, *, Generator? generator=None) -> Tensor
  30. inline at::Tensor normal(const at::Tensor & mean, double std=1, c10::optional<at::Generator> generator=c10::nullopt) {
  31. return at::_ops::normal_Tensor_float::call(mean, std, generator);
  32. }
  33. // aten::normal.float_Tensor_out(float mean, Tensor std, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!)
  34. inline at::Tensor & normal_out(at::Tensor & out, double mean, const at::Tensor & std, c10::optional<at::Generator> generator=c10::nullopt) {
  35. return at::_ops::normal_float_Tensor_out::call(mean, std, generator, out);
  36. }
  37. // aten::normal.float_Tensor_out(float mean, Tensor std, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!)
  38. inline at::Tensor & normal_outf(double mean, const at::Tensor & std, c10::optional<at::Generator> generator, at::Tensor & out) {
  39. return at::_ops::normal_float_Tensor_out::call(mean, std, generator, out);
  40. }
  41. // aten::normal.float_Tensor(float mean, Tensor std, *, Generator? generator=None) -> Tensor
  42. inline at::Tensor normal(double mean, const at::Tensor & std, c10::optional<at::Generator> generator=c10::nullopt) {
  43. return at::_ops::normal_float_Tensor::call(mean, std, generator);
  44. }
  45. // aten::normal.Tensor_Tensor_out(Tensor mean, Tensor std, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!)
  46. inline at::Tensor & normal_out(at::Tensor & out, const at::Tensor & mean, const at::Tensor & std, c10::optional<at::Generator> generator=c10::nullopt) {
  47. return at::_ops::normal_Tensor_Tensor_out::call(mean, std, generator, out);
  48. }
  49. // aten::normal.Tensor_Tensor_out(Tensor mean, Tensor std, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!)
  50. inline at::Tensor & normal_outf(const at::Tensor & mean, const at::Tensor & std, c10::optional<at::Generator> generator, at::Tensor & out) {
  51. return at::_ops::normal_Tensor_Tensor_out::call(mean, std, generator, out);
  52. }
  53. // aten::normal.Tensor_Tensor(Tensor mean, Tensor std, *, Generator? generator=None) -> Tensor
  54. inline at::Tensor normal(const at::Tensor & mean, const at::Tensor & std, c10::optional<at::Generator> generator=c10::nullopt) {
  55. return at::_ops::normal_Tensor_Tensor::call(mean, std, generator);
  56. }
  57. // aten::normal.float_float(float mean, float std, SymInt[] size, *, Generator? generator=None, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
  58. inline at::Tensor normal(double mean, double std, at::IntArrayRef size, c10::optional<at::Generator> generator=c10::nullopt, at::TensorOptions options={}) {
  59. return at::_ops::normal_float_float::call(mean, std, c10::fromIntArrayRefSlow(size), generator, 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<T, int64_t>::value>>
  63. at::Tensor normal(double mean, double std, at::IntArrayRef size, c10::optional<at::Generator> generator=c10::nullopt, at::TensorOptions options={}) {
  64. return at::_ops::normal_float_float::call(mean, std, c10::fromIntArrayRefSlow(size), generator, optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
  65. }
  66. }
  67. // aten::normal.float_float(float mean, float std, SymInt[] size, *, Generator? generator=None, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
  68. inline at::Tensor normal(double mean, double std, at::IntArrayRef size, c10::optional<at::Generator> generator, c10::optional<at::ScalarType> dtype, c10::optional<at::Layout> layout, c10::optional<at::Device> device, c10::optional<bool> pin_memory) {
  69. return at::_ops::normal_float_float::call(mean, std, c10::fromIntArrayRefSlow(size), generator, dtype, layout, device, pin_memory);
  70. }
  71. namespace symint {
  72. template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
  73. at::Tensor normal(double mean, double std, at::IntArrayRef size, c10::optional<at::Generator> generator, c10::optional<at::ScalarType> dtype, c10::optional<at::Layout> layout, c10::optional<at::Device> device, c10::optional<bool> pin_memory) {
  74. return at::_ops::normal_float_float::call(mean, std, c10::fromIntArrayRefSlow(size), generator, dtype, layout, device, pin_memory);
  75. }
  76. }
  77. // aten::normal.float_float(float mean, float std, SymInt[] size, *, Generator? generator=None, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
  78. inline at::Tensor normal_symint(double mean, double std, c10::SymIntArrayRef size, c10::optional<at::Generator> generator=c10::nullopt, at::TensorOptions options={}) {
  79. return at::_ops::normal_float_float::call(mean, std, size, generator, optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
  80. }
  81. namespace symint {
  82. template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
  83. at::Tensor normal(double mean, double std, c10::SymIntArrayRef size, c10::optional<at::Generator> generator=c10::nullopt, at::TensorOptions options={}) {
  84. return at::_ops::normal_float_float::call(mean, std, size, generator, optTypeMetaToScalarType(options.dtype_opt()), options.layout_opt(), options.device_opt(), options.pinned_memory_opt());
  85. }
  86. }
  87. // aten::normal.float_float(float mean, float std, SymInt[] size, *, Generator? generator=None, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor
  88. inline at::Tensor normal_symint(double mean, double std, c10::SymIntArrayRef size, c10::optional<at::Generator> generator, c10::optional<at::ScalarType> dtype, c10::optional<at::Layout> layout, c10::optional<at::Device> device, c10::optional<bool> pin_memory) {
  89. return at::_ops::normal_float_float::call(mean, std, size, generator, dtype, layout, device, pin_memory);
  90. }
  91. namespace symint {
  92. template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
  93. at::Tensor normal(double mean, double std, c10::SymIntArrayRef size, c10::optional<at::Generator> generator, c10::optional<at::ScalarType> dtype, c10::optional<at::Layout> layout, c10::optional<at::Device> device, c10::optional<bool> pin_memory) {
  94. return at::_ops::normal_float_float::call(mean, std, size, generator, dtype, layout, device, pin_memory);
  95. }
  96. }
  97. // aten::normal.float_float_out(float mean, float std, SymInt[] size, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!)
  98. inline at::Tensor & normal_out(at::Tensor & out, double mean, double std, at::IntArrayRef size, c10::optional<at::Generator> generator=c10::nullopt) {
  99. return at::_ops::normal_float_float_out::call(mean, std, c10::fromIntArrayRefSlow(size), generator, out);
  100. }
  101. namespace symint {
  102. template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
  103. at::Tensor & normal_out(at::Tensor & out, double mean, double std, at::IntArrayRef size, c10::optional<at::Generator> generator=c10::nullopt) {
  104. return at::_ops::normal_float_float_out::call(mean, std, c10::fromIntArrayRefSlow(size), generator, out);
  105. }
  106. }
  107. // aten::normal.float_float_out(float mean, float std, SymInt[] size, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!)
  108. inline at::Tensor & normal_outf(double mean, double std, at::IntArrayRef size, c10::optional<at::Generator> generator, at::Tensor & out) {
  109. return at::_ops::normal_float_float_out::call(mean, std, c10::fromIntArrayRefSlow(size), generator, out);
  110. }
  111. namespace symint {
  112. template <typename T, typename = std::enable_if_t<std::is_same<T, int64_t>::value>>
  113. at::Tensor & normal_outf(double mean, double std, at::IntArrayRef size, c10::optional<at::Generator> generator, at::Tensor & out) {
  114. return at::_ops::normal_float_float_out::call(mean, std, c10::fromIntArrayRefSlow(size), generator, out);
  115. }
  116. }
  117. // aten::normal.float_float_out(float mean, float std, SymInt[] size, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!)
  118. inline at::Tensor & normal_symint_out(at::Tensor & out, double mean, double std, c10::SymIntArrayRef size, c10::optional<at::Generator> generator=c10::nullopt) {
  119. return at::_ops::normal_float_float_out::call(mean, std, size, generator, out);
  120. }
  121. namespace symint {
  122. template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
  123. at::Tensor & normal_out(at::Tensor & out, double mean, double std, c10::SymIntArrayRef size, c10::optional<at::Generator> generator=c10::nullopt) {
  124. return at::_ops::normal_float_float_out::call(mean, std, size, generator, out);
  125. }
  126. }
  127. // aten::normal.float_float_out(float mean, float std, SymInt[] size, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!)
  128. inline at::Tensor & normal_symint_outf(double mean, double std, c10::SymIntArrayRef size, c10::optional<at::Generator> generator, at::Tensor & out) {
  129. return at::_ops::normal_float_float_out::call(mean, std, size, generator, out);
  130. }
  131. namespace symint {
  132. template <typename T, typename = std::enable_if_t<std::is_same<T, c10::SymInt>::value>>
  133. at::Tensor & normal_outf(double mean, double std, c10::SymIntArrayRef size, c10::optional<at::Generator> generator, at::Tensor & out) {
  134. return at::_ops::normal_float_float_out::call(mean, std, size, generator, out);
  135. }
  136. }
  137. // aten::normal.out(Tensor self, float mean=0, float std=1, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!)
  138. inline at::Tensor & normal_out(at::Tensor & out, const at::Tensor & self, double mean=0, double std=1, c10::optional<at::Generator> generator=c10::nullopt) {
  139. return at::_ops::normal_out::call(self, mean, std, generator, out);
  140. }
  141. // aten::normal.out(Tensor self, float mean=0, float std=1, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!)
  142. inline at::Tensor & normal_outf(const at::Tensor & self, double mean, double std, c10::optional<at::Generator> generator, at::Tensor & out) {
  143. return at::_ops::normal_out::call(self, mean, std, generator, out);
  144. }
  145. }