Skip to content
Snippets Groups Projects
Commit ec8b5aea authored by Michael Zbyszyński's avatar Michael Zbyszyński
Browse files

sorted out accelerate library

parent e6f593af
Branches
Tags
No related merge requests found
......@@ -26,6 +26,8 @@ include_directories(dependencies/third_party/json)
file(GLOB_RECURSE RAPIDMIX_SRC "${PROJECT_SOURCE_DIR}/src/*.cpp")
file(GLOB GVF_SRC "${PROJECT_SOURCE_DIR}/dependencies/GVF/GVF.cpp")
file(GLOB MAXI_SRC "${PROJECT_SOURCE_DIR}/dependencies/Maximilian/maximilian.cpp")
file(GLOB MAXI_SRC ${MAXI_SRC} "${PROJECT_SOURCE_DIR}/dependencies/Maximilian/libs/maxiFFT.cpp")
file(GLOB MAXI_SRC ${MAXI_SRC} "${PROJECT_SOURCE_DIR}/dependencies/Maximilian/libs/fft.cpp")
file(GLOB RAPIDLIB_SRC "${PROJECT_SOURCE_DIR}/dependencies/RapidLib/src/*.cpp")
file(GLOB RAPIDLIB_DEP "${PROJECT_SOURCE_DIR}/dependencies/RapidLib/dependencies/libsvm/libsvm.cpp")
file(GLOB JSON_SRC "${PROJECT_SOURCE_DIR}/dependencies/third_party/jsoncpp.cpp")
......@@ -43,4 +45,11 @@ set(RAPIDMIX_FULL_SRC ${RAPIDMIX_SRC}
add_library(RMIX ${RAPIDMIX_FULL_SRC})
add_executable(rapidmix tests/rapidMixTest.cpp )
target_link_libraries(rapidmix RMIX)
if (APPLE)
find_library(ACCELERATE Accelerate)
if (NOT ACCELERATE)
message(FATAL_ERROR "Accelearate not found")
endif()
target_link_libraries(rapidmix RMIX ${ACCELERATE})
endif()
......@@ -54,5 +54,18 @@ int main() {
assert(myNN.run(inputVec)[0] == 12.596715279688549);
std::cout << "staticRegression passed." << std::endl;
/////////////////////////////////////Test Maxi signal processing
rapidmix::FFT myFFT;
myFFT.setup(1024, 512, 265);
for (int i = 0; i < 1024; ++i) {
float input = (i % 256/256.0);
myFFT.process(input);
}
assert(myFFT.spectralCentroid() == 3520.84277f);
std::cout << "maxi fft passed" << std::endl;
return 0;
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment