Unfold2d.h 981 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #pragma once
  2. #include <ATen/native/DispatchStub.h>
  3. #include <c10/core/ScalarType.h>
  4. #include <cstdint>
  5. namespace at::native {
  6. using unfold2d_copy_fn = void (*)(
  7. ScalarType dtype,
  8. void *finput,
  9. const void *input,
  10. int64_t kH,
  11. int64_t kW,
  12. int64_t dH,
  13. int64_t dW,
  14. int64_t padH,
  15. int64_t padW,
  16. int64_t n_input_plane,
  17. int64_t input_height,
  18. int64_t input_width,
  19. int64_t output_height,
  20. int64_t output_width,
  21. bool is_channels_last
  22. );
  23. using unfold2d_acc_fn = void (*)(
  24. ScalarType dtype,
  25. void *finput,
  26. void *input,
  27. int64_t kH,
  28. int64_t kW,
  29. int64_t dH,
  30. int64_t dW,
  31. int64_t padH,
  32. int64_t padW,
  33. int64_t n_input_plane,
  34. int64_t input_height,
  35. int64_t input_width,
  36. int64_t output_height,
  37. int64_t output_width,
  38. bool is_channels_last
  39. );
  40. DECLARE_DISPATCH(unfold2d_copy_fn, unfolded2d_copy_stub);
  41. DECLARE_DISPATCH(unfold2d_acc_fn, unfolded2d_acc_stub);
  42. } // namespace at::native