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.

warp_affine.cpp 907 B

1234567891011121314151617181920212223242526272829303132
  1. #include "test/common/warp_affine.h"
  2. #include "test/common/checker.h"
  3. #include "test/cpu/fixture.h"
  4. namespace megdnn {
  5. namespace test {
  6. TEST_F(CPU, WARP_AFFINE_CV) {
  7. using namespace warp_affine;
  8. std::vector<TestArg> args = get_cv_args();
  9. Checker<WarpAffine> checker(handle());
  10. for (auto&& arg : args) {
  11. checker.set_param(arg.param)
  12. .set_dtype(0, dtype::Uint8())
  13. .set_dtype(1, dtype::Float32())
  14. .set_dtype(2, dtype::Uint8())
  15. .execs({arg.src, arg.trans, arg.dst});
  16. }
  17. for (auto&& arg : args) {
  18. checker.set_param(arg.param)
  19. .set_dtype(0, dtype::Float32())
  20. .set_dtype(1, dtype::Float32())
  21. .set_dtype(2, dtype::Float32())
  22. .execs({arg.src, arg.trans, arg.dst});
  23. }
  24. }
  25. } // namespace test
  26. } // namespace megdnn
  27. // vim: syntax=cpp.doxygen