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.

flip.h 981 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #pragma once
  2. #include "megdnn/basic_types.h"
  3. #include "megdnn/opr_param_defs.h"
  4. namespace megdnn {
  5. namespace test {
  6. namespace flip {
  7. struct TestArg {
  8. param::Flip param;
  9. TensorShape src;
  10. TestArg(param::Flip param_, TensorShape src_) : param(param_), src(src_) {}
  11. };
  12. static inline std::vector<TestArg> get_args() {
  13. std::vector<TestArg> args;
  14. param::Flip cur_param;
  15. for (size_t h : {4, 5}) {
  16. for (size_t w : {3, 4}) {
  17. for (size_t c : {1, 3}) {
  18. for (bool vertical : {false, true}) {
  19. for (bool horizontal : {false, true}) {
  20. cur_param.horizontal = horizontal;
  21. cur_param.vertical = vertical;
  22. args.emplace_back(cur_param, TensorShape{2, h, w, c});
  23. }
  24. }
  25. }
  26. }
  27. }
  28. return args;
  29. }
  30. } // namespace flip
  31. } // namespace test
  32. } // namespace megdnn
  33. // vim: syntax=cpp.doxygen