ParallelNative.h 354 B

12345678910111213141516171819
  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::internal {
  8. TORCH_API void invoke_parallel(
  9. const int64_t begin,
  10. const int64_t end,
  11. const int64_t grain_size,
  12. const std::function<void(int64_t, int64_t)>& f);
  13. } // namespace at::internal