Skip to content

Commit 24c1984

Browse files
committed
removed KFR dependency
1 parent e316c22 commit 24c1984

8 files changed

Lines changed: 4 additions & 133 deletions

File tree

ports/kfr/portfile.cmake

Lines changed: 0 additions & 36 deletions
This file was deleted.

ports/kfr/vcpkg.json

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ find_package(benchmark CONFIG REQUIRED)
55
find_package(Armadillo REQUIRED)
66
find_package(Eigen3 CONFIG REQUIRED)
77
find_package(OpenBLAS CONFIG REQUIRED)
8-
find_package(KFR CONFIG REQUIRED)
98
find_package(FFTW3 CONFIG REQUIRED)
109
find_package(FFTW3f CONFIG REQUIRED)
1110
find_package(OpenCV CONFIG REQUIRED)
@@ -19,4 +18,4 @@ add_subdirectory(matrix_conversion)
1918
add_subdirectory(matrix_shift)
2019
add_subdirectory(conv1d)
2120
add_subdirectory(similarity)
22-
add_subdirectory(hilbert)
21+
add_subdirectory(hilbert)

src/conv1d/CMakeLists.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,18 @@ function(add_executable_script EXE_NAME)
2020
Eigen3::Eigen
2121
FFTW3::fftw3
2222
FFTW3::fftw3f
23-
kfr
24-
kfr_dsp
2523
opencv_world
2624
)
2725

2826
if (IPP_FOUND)
2927
target_link_libraries(${EXE_NAME} PRIVATE ${IPP_LIBRARIES})
3028
target_compile_definitions(${EXE_NAME} PRIVATE -DHAS_IPP)
3129
endif()
32-
33-
if (APPLE)
34-
target_link_libraries(${EXE_NAME} PRIVATE kfr_dsp_neon64)
35-
endif()
3630

3731
endfunction()
3832

3933

4034
add_executable_script(conv1d main.cpp)
4135

4236
add_executable_script(conv1d_bench benchmarks.cpp)
43-
target_link_libraries(conv1d_bench PRIVATE benchmark::benchmark benchmark::benchmark_main)
37+
target_link_libraries(conv1d_bench PRIVATE benchmark::benchmark benchmark::benchmark_main)

src/conv1d/benchmarks.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,6 @@ void BM_conv1d_Eigen(benchmark::State &state) {
134134
}
135135
BENCHMARK(BM_conv1d_Eigen<double>)->ArgsProduct(ARGS);
136136

137-
template <fftconv::Floating Real> void BM_conv1d_KFR(benchmark::State &state) {
138-
conv_bench_same<Real>(state, conv1d_KFR_fir<Real>);
139-
}
140-
BENCHMARK(BM_conv1d_KFR<double>)->ArgsProduct(ARGS);
141-
142137
template <fftconv::Floating Real>
143138
void BM_conv1d_OpenCV(benchmark::State &state) {
144139
conv_bench_same<Real>(state, conv1d_OpenCV<Real>);

src/conv1d/conv1d.hpp

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include <Eigen/Dense>
44
#include <fmt/core.h>
55
#include <fmt/ranges.h>
6-
#include <kfr/all.hpp>
76
#include <opencv2/core/hal/intrin.hpp>
87
#include <opencv2/opencv.hpp>
98
#include <span>
@@ -306,34 +305,6 @@ void conv1d_eigen(const std::span<const T> input_,
306305
}
307306
}
308307

309-
/*
310-
KFR (same mode)
311-
*/
312-
template <typename T>
313-
void conv1d_KFR_fir(const std::span<const T> input,
314-
const std::span<const T> kernel, std::span<T> output) {
315-
316-
auto input_ = kfr::make_univector(input.data(), input.size());
317-
auto kernel_ = kfr::make_univector(kernel.data(), kernel.size());
318-
auto output_ = kfr::make_univector(output.data(), output.size());
319-
320-
kfr::filter_fir<T> filter(kernel_);
321-
filter.apply(output_, input_);
322-
}
323-
324-
// Link error
325-
// #ifndef __APPLE__
326-
// template <typename T>
327-
// void conv1d_kfr_oa(const std::span<const T> input,
328-
// const std::span<const T> kernel, std::span<T> output) {
329-
// auto input_ = kfr::make_univector(input.data(), input.size());
330-
// auto kernel_ = kfr::make_univector(kernel.data(), kernel.size());
331-
// auto output_ = kfr::make_univector(output.data(), output.size());
332-
// kfr::convolve_filter<T> filter(kernel_);
333-
// filter.apply(output_, input_);
334-
// }
335-
// #endif
336-
337308
/*
338309
OpenCV (same mode)
339310
*/

src/conv1d/main.cpp

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -74,22 +74,6 @@ int main(int argc, char *argv[]) {
7474
fmt::println("Output: {}", fmt::join(output, ", "));
7575
}
7676

77-
{
78-
std::vector<T> output(output_size_same, 0);
79-
conv1d_KFR_fir<T>(input, kernel, output);
80-
fmt::println("=== KFR (FIR convolve) ===");
81-
fmt::println("Output: {}", fmt::join(output, ", "));
82-
}
83-
84-
// #ifndef __APPLE__
85-
// {
86-
// std::vector<T> output(output_size_same, 0);
87-
// conv1d_kfr_oa<T>(input, kernel, output);
88-
// fmt::println("=== KFR (oa) ===");
89-
// fmt::println("Output: {}", fmt::join(output, ", "));
90-
// }
91-
// #endif
92-
9377
{
9478
std::vector<T> output(output_size_same, 0);
9579
conv1d_OpenCV<T>(input, kernel, output);
@@ -132,4 +116,4 @@ int main(int argc, char *argv[]) {
132116
return 0;
133117
}
134118

135-
// NOLINTEND(*-magic-numbers)
119+
// NOLINTEND(*-magic-numbers)

vcpkg.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@
4040
]
4141
},
4242
"fftconv",
43-
"openblas",
44-
"kfr"
43+
"openblas"
4544
],
4645
"builtin-baseline": "4b6c50d962cc20aaa3ef457f8ba683b586263cfb"
4746
}

0 commit comments

Comments
 (0)