CanUse32BitIndexMath.h 496 B

123456789101112131415161718
  1. #if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
  2. #pragma once
  3. #include <c10/macros/Export.h>
  4. #include <limits>
  5. namespace at {
  6. class TensorBase;
  7. }
  8. namespace at::native {
  9. TORCH_API bool canUse32BitIndexMath(const at::TensorBase &t, int64_t max_elem=std::numeric_limits<int32_t>::max());
  10. }
  11. #else
  12. #error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined."
  13. #endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)