You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

defs.h 685 B

123456789101112131415161718192021222324
  1. #pragma once
  2. #define MEGDNN_MAX_NDIM 7
  3. /*!
  4. * \brief iterate through small (usually used) ndim values
  5. */
  6. #define MEGDNN_FOREACH_TENSOR_NDIM_SMALL(cb, ...) \
  7. cb(1, ##__VA_ARGS__) cb(2, ##__VA_ARGS__) cb(3, ##__VA_ARGS__)
  8. /*!
  9. * \brief iterate through large (rarely used) ndim values
  10. */
  11. #define MEGDNN_FOREACH_TENSOR_NDIM_LARGE(cb, ...) \
  12. cb(4, ##__VA_ARGS__) cb(5, ##__VA_ARGS__) cb(6, ##__VA_ARGS__) cb(7, ##__VA_ARGS__)
  13. /*!
  14. * \brief iterate through all ndim values
  15. */
  16. #define MEGDNN_FOREACH_TENSOR_NDIM(cb, ...) \
  17. MEGDNN_FOREACH_TENSOR_NDIM_SMALL(cb, ##__VA_ARGS__) \
  18. MEGDNN_FOREACH_TENSOR_NDIM_LARGE(cb, ##__VA_ARGS__)
  19. // vim: syntax=cpp.doxygen