Copy.h 626 B

12345678910111213141516171819202122232425
  1. #if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
  2. #pragma once
  3. #include <ATen/native/DispatchStub.h>
  4. namespace at {
  5. class Tensor;
  6. struct TensorIterator;
  7. class TensorBase;
  8. namespace native {
  9. using copy_fn = void (*)(TensorIterator&, bool non_blocking);
  10. DECLARE_DISPATCH(copy_fn, copy_stub)
  11. TORCH_API void copy_ignoring_overlaps(const TensorBase &dst, const TensorBase &src);
  12. } // namespace native
  13. } // namespace at
  14. #else
  15. #error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined."
  16. #endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)