ParallelNative.h 380 B

12345678910111213141516171819202122
  1. #pragma once
  2. #include <algorithm>
  3. #include <cstddef>
  4. #include <exception>
  5. #include <c10/util/Exception.h>
  6. #define INTRA_OP_PARALLEL
  7. namespace at {
  8. namespace internal {
  9. TORCH_API void invoke_parallel(
  10. const int64_t begin,
  11. const int64_t end,
  12. const int64_t grain_size,
  13. const std::function<void(int64_t, int64_t)>& f);
  14. } // namespace internal
  15. } // namespace at