diff --git a/example/build_common.sh b/example/build_common.sh index c189158..47e77aa 100644 --- a/example/build_common.sh +++ b/example/build_common.sh @@ -33,7 +33,7 @@ COMPILER=${COMPILER:-mxcc} #COMPILER_FLAGS=${COMPILER_FLAGS:--O3 -std=c++17 --extended-lambda} # not run all test for easy debug COMPILER_FLAGS=${COMPILER_FLAGS:--O3 -std=c++17 --extended-lambda -DRUN_FULL_TEST} -INCLUDE_DIR=${INCLUDE_DIR:-} +INCLUDE_DIR=${INCLUDE_DIR:-cp_template} BUILD_DIR=${BUILD_DIR:-build} # 编译单个算法的通用函数 @@ -49,7 +49,7 @@ compile_algorithm() { mkdir -p "$BUILD_DIR" # 编译命令 - local compile_cmd="$COMPILER $COMPILER_FLAGS -I$INCLUDE_DIR $source_file -o $target_file" + local compile_cmd="$COMPILER $COMPILER_FLAGS -I$INCLUDE_DIR cp_template/$source_file -o $target_file" print_info "执行: $compile_cmd" diff --git a/example/performance_utils.h b/example/cp_template/performance_utils.h similarity index 100% rename from example/performance_utils.h rename to example/cp_template/performance_utils.h diff --git a/example/reduce_sum_algorithm.maca b/example/cp_template/reduce_sum_algorithm.maca similarity index 100% rename from example/reduce_sum_algorithm.maca rename to example/cp_template/reduce_sum_algorithm.maca diff --git a/example/sort_pair_algorithm.maca b/example/cp_template/sort_pair_algorithm.maca similarity index 100% rename from example/sort_pair_algorithm.maca rename to example/cp_template/sort_pair_algorithm.maca diff --git a/example/test_utils.h b/example/cp_template/test_utils.h similarity index 100% rename from example/test_utils.h rename to example/cp_template/test_utils.h diff --git a/example/topk_pair_algorithm.maca b/example/cp_template/topk_pair_algorithm.maca similarity index 100% rename from example/topk_pair_algorithm.maca rename to example/cp_template/topk_pair_algorithm.maca diff --git a/example/yaml_reporter.h b/example/cp_template/yaml_reporter.h similarity index 100% rename from example/yaml_reporter.h rename to example/cp_template/yaml_reporter.h