| #------------------------------------------------------------------------------- | |
| # Build libraries and unit tests for RISP4ML blocks. | |
| # Use different source files for RVV and non-RVV versions | |
| #------------------------------------------------------------------------------- | |
| set(BLC_SRC "blc.c") | |
| set(DEMOSAIC_SRC "demosaic.c") | |
| set(DG_SRC "dg.c") | |
| set(DOWNSCALE_SRC "downscale.c") | |
| set(GAMMA_SRC "gamma.c") | |
| set(WBG_SRC "wbg.c") | |
| set(DOWNSCALE_TEST_SRC "downscale_test.cc") | |
| set(GAMMA_TEST_SRC "gamma_test.cc") | |
| if (${BUILD_WITH_RVV}) | |
| set(BLC_SRC "blc_rvv.c") | |
| set(DEMOSAIC_SRC "demosaic_rvv.c") | |
| set(DG_SRC "dg_rvv.c") | |
| set(DOWNSCALE_SRC "downscale_rvv.c") | |
| set(GAMMA_SRC "gamma_rvv.c") | |
| set(WBG_SRC "wbg_rvv.c") | |
| set(DOWNSCALE_TEST_SRC "downscale_rvv_test.cc") | |
| set(GAMMA_TEST_SRC "gamma_rvv_test.cc") | |
| add_definitions(-DISP_WITH_RVV) | |
| endif() | |
| iree_cc_library( | |
| NAME | |
| blc | |
| HDRS | |
| "blc.h" | |
| SRCS | |
| ${BLC_SRC} | |
| DEPS | |
| risp4ml::common::image | |
| risp4ml::common::utils | |
| ) | |
| iree_cc_library( | |
| NAME | |
| demosaic | |
| HDRS | |
| "demosaic.h" | |
| SRCS | |
| ${DEMOSAIC_SRC} | |
| DEPS | |
| risp4ml::common::image | |
| risp4ml::common::utils | |
| ) | |
| iree_cc_library( | |
| NAME | |
| dg | |
| HDRS | |
| "dg.h" | |
| SRCS | |
| ${DG_SRC} | |
| DEPS | |
| risp4ml::common::image | |
| risp4ml::common::utils | |
| ) | |
| iree_cc_library( | |
| NAME | |
| downscale | |
| HDRS | |
| "downscale.h" | |
| SRCS | |
| ${DOWNSCALE_SRC} | |
| DEPS | |
| risp4ml::common::image | |
| risp4ml::common::utils | |
| ) | |
| iree_cc_library( | |
| NAME | |
| gamma | |
| HDRS | |
| "gamma.h" | |
| SRCS | |
| ${GAMMA_SRC} | |
| DEPS | |
| risp4ml::common::image | |
| risp4ml::common::utils | |
| ) | |
| iree_cc_library( | |
| NAME | |
| wbg | |
| HDRS | |
| "wbg.h" | |
| SRCS | |
| ${WBG_SRC} | |
| DEPS | |
| risp4ml::common::image | |
| risp4ml::common::utils | |
| ) | |
| sparrow_test( | |
| NAME | |
| blc_test | |
| SRCS | |
| "blc_test.cc" | |
| DEPS | |
| ::blc | |
| risp4ml::common::test_utils | |
| pw_unit_test | |
| pw_unit_test.main | |
| pw_assert_basic | |
| TESTFILES | |
| "blc_test.run" | |
| ) | |
| sparrow_test( | |
| NAME | |
| dg_test | |
| SRCS | |
| "dg_test.cc" | |
| DEPS | |
| ::dg | |
| risp4ml::common::test_utils | |
| pw_unit_test | |
| pw_unit_test.main | |
| pw_assert_basic | |
| TESTFILES | |
| "dg_test.run" | |
| ) | |
| sparrow_test( | |
| NAME | |
| wbg_test | |
| SRCS | |
| "wbg_test.cc" | |
| DEPS | |
| ::wbg | |
| pw_unit_test | |
| pw_unit_test.main | |
| pw_assert_basic | |
| TESTFILES | |
| "wbg_test.run" | |
| ) | |
| # Do not compile the following tests for Kelvin | |
| if (${BUILD_WITH_KELVIN}) | |
| return() | |
| endif() | |
| sparrow_test( | |
| NAME | |
| downscale_test | |
| SRCS | |
| ${DOWNSCALE_TEST_SRC} | |
| DEPS | |
| ::downscale | |
| pw_unit_test | |
| pw_unit_test.main | |
| pw_assert_basic | |
| TESTFILES | |
| "downscale_test.run" | |
| ) | |
| sparrow_test( | |
| NAME | |
| gamma_test | |
| SRCS | |
| ${GAMMA_TEST_SRC} | |
| DEPS | |
| ::gamma | |
| pw_unit_test | |
| pw_unit_test.main | |
| pw_assert_basic | |
| TESTFILES | |
| "gamma_test.run" | |
| ) |