File tree Expand file tree Collapse file tree 6 files changed +57
-6
lines changed
Expand file tree Collapse file tree 6 files changed +57
-6
lines changed Original file line number Diff line number Diff line change 4545 " ${commonDefs}"
4646 ],
4747 "configurationProvider" : " ms-vscode.cmake-tools"
48+ },
49+ {
50+ "name" : " Linux-arm" ,
51+ "includePath" : [
52+ " ${commonIncludePaths}"
53+ ],
54+ "defines" : [
55+ " SAF_USE_OPEN_BLAS_AND_LAPACKE" ,
56+ " SAF_ENABLE_SOFA_READER_MODULE" ,
57+ " SAF_ENABLE_TRACKER_MODULE"
58+ ],
59+ "macFrameworkPath" : [],
60+ "compilerPath" : " /usr/bin/gcc" ,
61+ "cStandard" : " c11" ,
62+ "cppStandard" : " c++17" ,
63+ "intelliSenseMode" : " ${default}" ,
64+ "configurationProvider" : " ms-vscode.cmake-tools"
4865 }
4966 ],
5067 "version" : 4
Original file line number Diff line number Diff line change 44 // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55 "version" : " 0.2.0" ,
66 "configurations" : [
7+
78 {
8- "name" : " (lldb ) Launch" ,
9+ "name" : " (gdb ) Launch" ,
910 "type" : " cppdbg" ,
1011 "request" : " launch" ,
11- "targetArchitecture" : " x86_64" ,
1212 "program" : " ${workspaceFolder}/build/test/saf_test" ,
1313 "args" : [],
1414 "stopAtEntry" : false ,
15- "cwd" : " ${workspaceFolder }" ,
15+ "cwd" : " ${fileDirname }" ,
1616 "environment" : [],
1717 "externalConsole" : false ,
18- "MIMode" : " lldb" ,
19- "miDebuggerPath" : " /usr/bin/gdb"
18+ "MIMode" : " gdb" ,
19+ "setupCommands" : [
20+ {
21+ "description" : " Enable pretty-printing for gdb" ,
22+ "text" : " -enable-pretty-printing" ,
23+ "ignoreFailures" : true
24+ }
25+ ]
2026 }
2127 ]
2228}
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ option(SAF_BUILD_EXTRAS "Build SAF extras."
1111option (SAF_ENABLE_SOFA_READER_MODULE "Enable the SAF SOFA READER module" OFF )
1212option (SAF_ENABLE_TRACKER_MODULE "Enable the SAF TRACKER module" OFF )
1313option (SAF_USE_INTEL_IPP "Use Intel IPP for the FFT, resampler, etc." OFF )
14+ option (SAF_USE_FFTW "Use FFTW3 for the FFT." OFF )
1415option (SAF_ENABLE_SIMD "Enable the use of SSE3, AVX2, AVX512" OFF )
1516if (NOT SAF_PERFORMANCE_LIB)
1617 set (SAF_PERFORMANCE_LIB "SAF_USE_INTEL_MKL_LP64" CACHE STRING "Performance library for SAF to use." )
Original file line number Diff line number Diff line change @@ -213,6 +213,29 @@ if(SAF_USE_INTEL_IPP)
213213 target_link_libraries (${PROJECT_NAME} PUBLIC ${INTEL_IPP_LIB} )
214214endif ()
215215
216+ ############################################################################
217+ # Enable/Disable FFTW
218+ if (SAF_USE_FFTW)
219+ # Indicate to saf that the saf_sofa_reader module should be enabled
220+ target_compile_definitions (${PROJECT_NAME} PUBLIC SAF_USE_FFTW=${SAF_USE_FFTW} )
221+
222+ # Header path and libs are platform dependent
223+ if (MSVC )
224+ message (FATAL_ERROR "Incomplete list" )
225+ elseif (MSYS OR MINGW)
226+ message (FATAL_ERROR "Incomplete list" )
227+ elseif (APPLE )
228+ message (FATAL_ERROR "Incomplete list" )
229+ elseif (UNIX AND NOT APPLE )
230+ find_library (FFTW_LIBRARY fftw3f HINTS /usr/local/lib )
231+ if (NOT FFTW_LIBRARY)
232+ message (FATAL_ERROR "FFTW_LIBRARY not found" )
233+ endif ()
234+ target_link_libraries (${PROJECT_NAME} PUBLIC ${FFTW_LIBRARY} )
235+ message (STATUS "Linking FFTW: ${FFTW_LIBRARY} " )
236+ endif ()
237+ endif ()
238+
216239############################################################################
217240# Enable SIMD intrinsics
218241if (SAF_ENABLE_SIMD)
Original file line number Diff line number Diff line change 209209 * implementations found in Intel IPP, Intel MKL and Apple Accelerate are
210210 * usually faster options.
211211 *
212- * Note, SAF uses the single-precision version (fftw3f.a ), which is built with:
212+ * Note, SAF uses the single-precision version (fftw3f), which is built with:
213213 * $ ./configure --enable-float
214214 * $ make
215215 *
Original file line number Diff line number Diff line change @@ -1202,6 +1202,10 @@ void utility_cvvmul
12021202 }
12031203 for (; i < len ; i ++ ) /* The residual (if len was not divisable by the step size): */
12041204 c [i ] = a [i ] * b [i ];
1205+ #elif __STDC_VERSION__ >= 199901L
1206+ int i ;
1207+ for (i = 0 ; i < len ; i ++ )
1208+ c [i ] = a [i ] * b [i ];
12051209#else
12061210 int i ;
12071211 for (i = 0 ; i < len ; i ++ )
You can’t perform that action at this time.
0 commit comments