Fill.h 650 B

1234567891011121314151617181920212223242526
  1. #if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
  2. // Functions that fill Tensors with constants. Implementations are in Fill.cpp.
  3. #pragma once
  4. #include <ATen/native/DispatchStub.h>
  5. namespace c10 {
  6. class Scalar;
  7. }
  8. namespace at {
  9. class Tensor;
  10. struct TensorIterator;
  11. namespace native {
  12. DECLARE_DISPATCH(void(*)(TensorIterator&, const c10::Scalar&), fill_stub)
  13. Tensor& fill_out(Tensor& self, const Scalar& value);
  14. }} // namespace at::native
  15. #else
  16. #error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined."
  17. #endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)