From 228a9d4ecc1d01e1ebf0a9f4df2a740dd4f7d907 Mon Sep 17 00:00:00 2001 From: Richard Shaw Date: Mon, 22 Apr 2019 15:16:25 -0500 Subject: [PATCH] Warn is no vectorization available and change uint to unsigned in in idct.c --- src/CMakeLists.txt | 8 ++++++-- src/idct.c | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 228fa8b..c12d643 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -48,8 +48,12 @@ target_link_libraries(dump_data lpcnetfreedv m codec2) add_executable(test_lpcnet test_lpcnet.c) target_link_libraries(test_lpcnet lpcnetfreedv m codec2) -add_executable(test_vec test_vec.c) -target_link_libraries(test_vec m) +if(AVX OR AVX2) + add_executable(test_vec test_vec.c) + target_link_libraries(test_vec m) +else() + message(WARNING "No AVX/AVX2 CPU flags identified, not building test_vec.") +endif() add_executable(quant_feat quant_feat.c) target_link_libraries(quant_feat lpcnetfreedv m codec2) diff --git a/src/idct.c b/src/idct.c index 08aa41c..b467b65 100644 --- a/src/idct.c +++ b/src/idct.c @@ -28,8 +28,8 @@ float std[] = { int main(int argc, char *argv[]) { FILE *fin, *fout; fin = stdin; fout = stdout; - uint ret; - uint stride = NB_BANDS; + unsigned int ret; + unsigned int stride = NB_BANDS; int measure = 0; int scaling = 0; @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) { float sum[NB_BANDS] = {0.0}; float sumsq[NB_BANDS] = {0.0}; float dctLy[stride], Ly[stride]; - uint i; for(i=0; i