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.

ops.h 1.1 kB

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. #include "./enum_macro.h"
  3. #include "./helper.h"
  4. #include "megbrain/imperative/ops/custom_opdef.h"
  5. #include "megbrain/opr/param_defs.h"
  6. #include "megdnn/opr_param_defs.h"
  7. namespace PYBIND11_NAMESPACE {
  8. namespace detail {
  9. #define ENUM_CASTER_DEF(name) \
  10. template <> \
  11. struct type_caster<name> { \
  12. PYBIND11_TYPE_CASTER(name, _(#name)); \
  13. \
  14. public: \
  15. bool load(handle src, bool); \
  16. static handle cast(const name& v, return_value_policy, handle); \
  17. };
  18. FOR_EACH_ENUM_PARAM(ENUM_CASTER_DEF)
  19. FOR_EACH_BIT_COMBINED_ENUM_PARAM(ENUM_CASTER_DEF)
  20. } // namespace detail
  21. } // namespace PYBIND11_NAMESPACE
  22. void init_ops(pybind11::module m);
  23. void init_custom(pybind11::module m);