| #------------------------------------------------------------------------------- |
| # 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_ISP_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 |
| samples::risp4ml::common::image |
| samples::risp4ml::common::utils |
| ) |
| |
| iree_cc_library( |
| NAME |
| demosaic |
| HDRS |
| "demosaic.h" |
| SRCS |
| ${DEMOSAIC_SRC} |
| DEPS |
| samples::risp4ml::common::image |
| samples::risp4ml::common::utils |
| ) |
| |
| iree_cc_library( |
| NAME |
| dg |
| HDRS |
| "dg.h" |
| SRCS |
| ${DG_SRC} |
| DEPS |
| samples::risp4ml::common::image |
| samples::risp4ml::common::utils |
| ) |
| |
| iree_cc_library( |
| NAME |
| downscale |
| HDRS |
| "downscale.h" |
| SRCS |
| ${DOWNSCALE_SRC} |
| DEPS |
| samples::risp4ml::common::image |
| samples::risp4ml::common::utils |
| ) |
| |
| iree_cc_library( |
| NAME |
| gamma |
| HDRS |
| "gamma.h" |
| SRCS |
| ${GAMMA_SRC} |
| DEPS |
| samples::risp4ml::common::image |
| samples::risp4ml::common::utils |
| ) |
| |
| iree_cc_library( |
| NAME |
| wbg |
| HDRS |
| "wbg.h" |
| SRCS |
| ${WBG_SRC} |
| DEPS |
| samples::risp4ml::common::image |
| samples::risp4ml::common::utils |
| ) |
| |
| iree_cc_binary( |
| NAME |
| blc_test |
| SRCS |
| "blc_test.cc" |
| DEPS |
| ::blc |
| samples::risp4ml::common::test_utils |
| pw_unit_test |
| pw_unit_test.main |
| pw_assert_basic |
| ) |
| |
| iree_cc_binary( |
| NAME |
| dg_test |
| SRCS |
| "dg_test.cc" |
| DEPS |
| ::dg |
| samples::risp4ml::common::test_utils |
| pw_unit_test |
| pw_unit_test.main |
| pw_assert_basic |
| ) |
| |
| iree_cc_binary( |
| NAME |
| downscale_test |
| SRCS |
| ${DOWNSCALE_TEST_SRC} |
| DEPS |
| ::downscale |
| pw_unit_test |
| pw_unit_test.main |
| pw_assert_basic |
| ) |
| |
| iree_cc_binary( |
| NAME |
| gamma_test |
| SRCS |
| ${GAMMA_TEST_SRC} |
| DEPS |
| ::gamma |
| pw_unit_test |
| pw_unit_test.main |
| pw_assert_basic |
| ) |
| |
| iree_cc_binary( |
| NAME |
| wbg_test |
| SRCS |
| "wbg_test.cc" |
| DEPS |
| ::wbg |
| pw_unit_test |
| pw_unit_test.main |
| pw_assert_basic |
| ) |