Giter VIP home page Giter VIP logo

kfrlib / kfr Goto Github PK

View Code? Open in Web Editor NEW
1.6K 1.6K 244.0 12.27 MB

Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)

Home Page: https://www.kfrlib.com

License: GNU General Public License v2.0

CMake 2.55% Python 0.42% C++ 68.63% C 28.34% Batchfile 0.05% Shell 0.01%
audio audio-processing avx avx512 clang cplusplus cplusplus-14 cplusplus-17 cpp14 cpp17 cxx dft digital-signal-processing discrete-fourier-transform dsp fast-fourier-transform fft header-only simd

kfr's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kfr's Issues

Intellisense issue on Visual Studio 2017

I'm using kfr on Visual Studio 2017. It works well, but intellisense either doesn't work or is extremely slow. Types are often not colored/detected, pressing F12 to go to the definition of a type (either a type from KFR or other library) always brings a loading bar that often never disappears, ...

Has anyone experienced this or has tips on how to fix it? I tried removing all the KFR files that I didn't need in the include folder, but it didn't seem to really help.

Build error on Ubuntu 16.04(Clang 3.8.0)

$ cmake -DENABLE_TESTS=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release ..
-- CMAKE_CXX_FLAGS=
-- CMAKE_CXX_FLAGS= 
-- The CXX compiler identification is Clang 3.8.0
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- C++ compiler: Clang 3.8.0 /usr/bin/clang++ 
-- CMAKE_SYSTEM_PROCESSOR=x86_64
-- X86
-- Detecting native cpu...
-- DETECTED_CPU=avx2
-- target_set_arch(use_arch INTERFACE avx2)
-- CPU_ARCH=avx2
-- Could NOT find MPFR (missing:  MPFR_INCLUDE_DIR MPFR_LIBRARIES) 
-- Could NOT find GMP (missing:  GMP_INCLUDE_DIR GMP_LIBRARIES) 
-- ARCH_TESTS = 
-- Testing for 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/administrator/work/kfr/build
$ make -j8
[  1%] Building CXX object examples/CMakeFiles/biquads.dir/biquads.cpp.o
[  3%] Building CXX object CMakeFiles/kfr_io.dir/include/kfr/io/impl/audiofile-impl.cpp.o
[  5%] Building CXX object tests/CMakeFiles/multiarch.dir/multiarch.cpp.o
[  7%] Building CXX object CMakeFiles/kfr_dft.dir/include/kfr/dft/impl/convolution-impl.cpp.o
[  9%] Building CXX object CMakeFiles/kfr_dft.dir/include/kfr/dft/impl/dft-impl-f32.cpp.o
[ 11%] Building CXX object tests/CMakeFiles/multiarch.dir/multiarch_fir_sse2.cpp.o
[ 15%] Building CXX object examples/CMakeFiles/window.dir/window.cpp.o
[ 13%] Building CXX object tests/CMakeFiles/multiarch.dir/multiarch_fir_avx.cpp.o
In file included from /home/administrator/work/kfr/tests/multiarch_fir_sse2.cpp:8:
In file included from /home/administrator/work/kfr/include/kfr/dsp.hpp:27:
/home/administrator/work/kfr/include/kfr/dsp/biquad.hpp:312:48: error: default initialization of an object of const type 'const csizes_t<1, 2, 4, 8, 16, 32, 64>' (aka
      'const cometa::cvals_t<unsigned long, 1, 2, 4, 8, 16, 32, 64>') without a user-provided default constructor
    constexpr csizes_t<1, 2, 4, 8, 16, 32, 64> sizes;
                                               ^
                                                    {}
In file included from /home/administrator/work/kfr/tests/multiarch.cpp:10:
In file included from /home/administrator/work/kfr/include/kfr/dsp.hpp:27:
/home/administrator/work/kfr/include/kfr/testo/../cometa/../dsp/biquad.hpp:312:48: error: default initialization of an object of const type 'const csizes_t<1, 2, 4, 8, 16, 32, 64>' (aka
      'const cometa::cvals_t<unsigned long, 1, 2, 4, 8, 16, 32, 64>') without a user-provided default constructor
    constexpr csizes_t<1, 2, 4, 8, 16, 32, 64> sizes;
                                               ^
                                                    {}
In file included from /home/administrator/work/kfr/examples/window.cpp:8:
In file included from /home/administrator/work/kfr/include/kfr/dsp.hpp:27:
/home/administrator/work/kfr/include/kfr/dsp/biquad.hpp:312:48: error: default initialization of an object of const type 'const csizes_t<1, 2, 4, 8, 16, 32, 64>' (aka
      'const cometa::cvals_t<unsigned long, 1, 2, 4, 8, 16, 32, 64>') without a user-provided default constructor
    constexpr csizes_t<1, 2, 4, 8, 16, 32, 64> sizes;
                                               ^
                                                    {}
In file included from /home/administrator/work/kfr/examples/biquads.cpp:8:
In file included from /home/administrator/work/kfr/include/kfr/dsp.hpp:27:
/home/administrator/work/kfr/include/kfr/dsp/biquad.hpp:312:48: error: default initialization of an object of const type 'const csizes_t<1, 2, 4, 8, 16, 32, 64>' (aka
      'const cometa::cvals_t<unsigned long, 1, 2, 4, 8, 16, 32, 64>') without a user-provided default constructor
    constexpr csizes_t<1, 2, 4, 8, 16, 32, 64> sizes;
                                               ^
                                                    {}
In file included from /home/administrator/work/kfr/tests/multiarch_fir_avx.cpp:8:
In file included from /home/administrator/work/kfr/include/kfr/dsp.hpp:27:
/home/administrator/work/kfr/include/kfr/dsp/biquad.hpp:312:48: error: default initialization of an object of const type 'const csizes_t<1, 2, 4, 8, 16, 32, 64>' (aka
      'const cometa::cvals_t<unsigned long, 1, 2, 4, 8, 16, 32, 64>') without a user-provided default constructor
    constexpr csizes_t<1, 2, 4, 8, 16, 32, 64> sizes;
                                               ^
                                                    {}
1 error generated.
tests/CMakeFiles/multiarch.dir/build.make:86: recipe for target 'tests/CMakeFiles/multiarch.dir/multiarch_fir_sse2.cpp.o' failed
make[2]: *** [tests/CMakeFiles/multiarch.dir/multiarch_fir_sse2.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 16%] Building CXX object CMakeFiles/kfr_dft.dir/include/kfr/dft/impl/dft-impl-f64.cpp.o
1 error generated.
tests/CMakeFiles/multiarch.dir/build.make:62: recipe for target 'tests/CMakeFiles/multiarch.dir/multiarch.cpp.o' failed
make[2]: *** [tests/CMakeFiles/multiarch.dir/multiarch.cpp.o] Error 1
[ 18%] Building CXX object CMakeFiles/kfr_dft.dir/include/kfr/dft/impl/dft-src.cpp.o
1 error generated.
tests/CMakeFiles/multiarch.dir/build.make:110: recipe for target 'tests/CMakeFiles/multiarch.dir/multiarch_fir_avx.cpp.o' failed
make[2]: *** [tests/CMakeFiles/multiarch.dir/multiarch_fir_avx.cpp.o] Error 1
CMakeFiles/Makefile2:372: recipe for target 'tests/CMakeFiles/multiarch.dir/all' failed
make[1]: *** [tests/CMakeFiles/multiarch.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 20%] Building CXX object CMakeFiles/kfr_dft.dir/include/kfr/dft/impl/fft-impl-f32.cpp.o
1 error generated.
examples/CMakeFiles/biquads.dir/build.make:62: recipe for target 'examples/CMakeFiles/biquads.dir/biquads.cpp.o' failed
make[2]: *** [examples/CMakeFiles/biquads.dir/biquads.cpp.o] Error 1
CMakeFiles/Makefile2:241: recipe for target 'examples/CMakeFiles/biquads.dir/all' failed
make[1]: *** [examples/CMakeFiles/biquads.dir/all] Error 2
[ 22%] Building CXX object CMakeFiles/kfr_dft.dir/include/kfr/dft/impl/fft-impl-f64.cpp.o
1 error generated.
examples/CMakeFiles/window.dir/build.make:62: recipe for target 'examples/CMakeFiles/window.dir/window.cpp.o' failed
make[2]: *** [examples/CMakeFiles/window.dir/window.cpp.o] Error 1
CMakeFiles/Makefile2:204: recipe for target 'examples/CMakeFiles/window.dir/all' failed
make[1]: *** [examples/CMakeFiles/window.dir/all] Error 2
[ 24%] Linking CXX static library libkfr_io.a
[ 24%] Built target kfr_io
[ 26%] Linking CXX static library libkfr_dft.a
[ 26%] Built target kfr_dft
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Build fails with gcc 8.2.1

On the same machine it works fine with clang-7.

Here's the log :

% LANG=C make                                                                                                                                                                                                           !10266
Scanning dependencies of target kfr_io
[ 14%] Building CXX object CMakeFiles/kfr_io.dir/include/kfr/io/impl/audiofile-impl.cpp.o
In file included from /home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/bitwise.hpp:29,
                 from /home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/operators.hpp:28,
                 from /home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/basic_expressions.hpp:28,
                 from /home/jcelerier/travail/kfr/include/kfr/io/impl/../audiofile.hpp:28,
                 from /home/jcelerier/travail/kfr/include/kfr/io/impl/audiofile-impl.cpp:27:
/home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/vec.hpp:138:57: error: expected parameter pack before ‘...’
     -> csizes_t<scale_get_index<counter, groupsize>(ind)...>
                                                         ^~~
/home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/vec.hpp:138:60: error: template argument 1 is invalid
     -> csizes_t<scale_get_index<counter, groupsize>(ind)...>
                                                            ^
/home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/vec.hpp:138:57: error: expected parameter pack before ‘...’
     -> csizes_t<scale_get_index<counter, groupsize>(ind)...>
                                                         ^~~
/home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/vec.hpp:138:60: error: template argument 1 is invalid
     -> csizes_t<scale_get_index<counter, groupsize>(ind)...>
                                                            ^
/home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/vec.hpp:138:57: error: expected parameter pack before ‘...’
     -> csizes_t<scale_get_index<counter, groupsize>(ind)...>
                                                         ^~~
/home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/vec.hpp:138:60: error: template argument 1 is invalid
     -> csizes_t<scale_get_index<counter, groupsize>(ind)...>
                                                            ^
/home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/vec.hpp:138:57: error: expected parameter pack before ‘...’
     -> csizes_t<scale_get_index<counter, groupsize>(ind)...>
                                                         ^~~
/home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/vec.hpp:138:60: error: template argument 1 is invalid
     -> csizes_t<scale_get_index<counter, groupsize>(ind)...>
                                                            ^
/home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/vec.hpp:138:57: error: expected parameter pack before ‘...’
     -> csizes_t<scale_get_index<counter, groupsize>(ind)...>
                                                         ^~~
/home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/vec.hpp:138:60: error: template argument 1 is invalid
     -> csizes_t<scale_get_index<counter, groupsize>(ind)...>
                                                            ^
/home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/vec.hpp:138:8: error: invalid use of template-name ‘cometa::csizes_t’ without an argument list
     -> csizes_t<scale_get_index<counter, groupsize>(ind)...>
        ^~~~~~~~
In file included from /home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/types.hpp:40,
                 from /home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/constants.hpp:28,
                 from /home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/bitwise.hpp:28,
                 from /home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/operators.hpp:28,
                 from /home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/basic_expressions.hpp:28,
                 from /home/jcelerier/travail/kfr/include/kfr/io/impl/../audiofile.hpp:28,
                 from /home/jcelerier/travail/kfr/include/kfr/io/impl/audiofile-impl.cpp:27:
/home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/../cometa.hpp:458:44: note: ‘template<long unsigned int ...values> using csizes_t = cometa::cvals_t<long unsigned int, indices ...>’ declared here
 using csizes_t = cvals_t<size_t, values...>;
                                            ^
In file included from /home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/bitwise.hpp:29,
                 from /home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/operators.hpp:28,
                 from /home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/basic_expressions.hpp:28,
                 from /home/jcelerier/travail/kfr/include/kfr/io/impl/../audiofile.hpp:28,
                 from /home/jcelerier/travail/kfr/include/kfr/io/impl/audiofile-impl.cpp:27:
/home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/vec.hpp:138:16: error: expected initializer before ‘<’ token
     -> csizes_t<scale_get_index<counter, groupsize>(ind)...>
                ^
/home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/vec.hpp: In function ‘constexpr auto kfr::scale()’:
/home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/vec.hpp:147:22: error: ‘scale_impl’ is not a member of ‘kfr::internal’
     return internal::scale_impl(csizes_t<indices...>(), csizeseq_t<sizeof...(indices) * groupsize>());
                      ^~~~~~~~~~
/home/jcelerier/travail/kfr/include/kfr/io/impl/../../base/vec.hpp:147:22: note: suggested alternative: ‘concat_impl’
     return internal::scale_impl(csizes_t<indices...>(), csizeseq_t<sizeof...(indices) * groupsize>());
                      ^~~~~~~~~~
                      concat_impl
make[2]: *** [CMakeFiles/kfr_io.dir/build.make:63: CMakeFiles/kfr_io.dir/include/kfr/io/impl/audiofile-impl.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/kfr_io.dir/all] Error 2

Unsure how to use the `aweighting()` function

Apologies if this is not the right place to place this kind of question.
I am new to kfr.
I am trying to use the aweighting function. I get float pcm data from my audio recorder and then try to use the function like this:

const size_t size = (size_t) 192;
univector<float> buffer = make_univector((float*) audioData, size);
univector<float, size> dB = amp_to_dB(aweighting(buffer));
latestValue= maxof(dB);

The values I get after applying the aweighting is very low.
With out aweighting, the max value I cant get is 0dB. With aweighting it is -148.579987
I can't find any information on how to use the function correctly, please point me in the right direction if such information is available. Thank you!

audio mixer

I try to mix multiple mono audio to one channel output.
is kfr have an api to do that efficiently ?

KFR_STD_COMPLEX causes error : call to implicitly-deleted default constructor of 'vec<..>'

When trying to define KFR_STD_COMPLEX and compile .lib of kfr_dfc, I get the following error;

error : call to implicitly-deleted default constructor of 'vec<kfr::sse2::internal::expression_padded<kfr::sse2::internal::expression_function<kfr::sse2::fn::div, int, kfr::sse2::internal::expression_slice<kfr::univector<std::complex<float>, 4294967295> &> > >::value_type, 4U>' (aka 'vec<std::complex<float>, 4U>')

My specifications:
Windows 7
Visual Studio 2017

cannot sync with Android Studio install TARGETS given no LIBRARY DESTINATION for shared library target

debug|armeabi-v7a :-- CMAKE_CXX_FLAGS=-g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -march=armv7-a -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -march=armv7-a -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -march=armv7-a -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -v -std=c++17 -v -std=c++17 -v -std=c++17
debug|armeabi-v7a :-- CMAKE_CXX_FLAGS= -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -march=armv7-a -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -march=armv7-a -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -march=armv7-a -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -v -std=c++17 -v -std=c++17 -v -std=c++17
debug|armeabi-v7a :-- C++ compiler: Clang 8.0 C:/Users/konek/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
debug|armeabi-v7a :-- CMAKE_SYSTEM_PROCESSOR=armv7-a
debug|armeabi-v7a :-- CPU_ARCH=detect
debug|armeabi-v7a :CMake Error at resampler/kfr/CMakeLists.txt:181 (install):
debug|armeabi-v7a : install TARGETS given no LIBRARY DESTINATION for shared library target
debug|armeabi-v7a : "kfr_io".
debug|armeabi-v7a :CMake Error at resampler/kfr/CMakeLists.txt:184 (install):
debug|armeabi-v7a : install TARGETS given no LIBRARY DESTINATION for shared library target
debug|armeabi-v7a : "kfr_dft".
debug|armeabi-v7a :-- Configuring incomplete, errors occurred!
debug|armeabi-v7a :See also "C:/Users/konek/StudioProjects/libmedia/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeOutput.log".
debug|armeabi-v7a :See also "C:/Users/konek/StudioProjects/libmedia/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeError.log".
debug|arm64-v8a :-- CMAKE_CXX_FLAGS=-g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -v -std=c++17 -v -std=c++17 -v -std=c++17
debug|arm64-v8a :-- CMAKE_CXX_FLAGS= -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -v -std=c++17 -v -std=c++17 -v -std=c++17
debug|arm64-v8a :-- C++ compiler: Clang 8.0 C:/Users/konek/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
debug|arm64-v8a :-- CMAKE_SYSTEM_PROCESSOR=aarch64
debug|arm64-v8a :-- CPU_ARCH=detect
debug|arm64-v8a :CMake Error at resampler/kfr/CMakeLists.txt:181 (install):
debug|arm64-v8a : install TARGETS given no LIBRARY DESTINATION for shared library target
debug|arm64-v8a : "kfr_io".
debug|arm64-v8a :CMake Error at resampler/kfr/CMakeLists.txt:184 (install):
debug|arm64-v8a : install TARGETS given no LIBRARY DESTINATION for shared library target
debug|arm64-v8a : "kfr_dft".
debug|arm64-v8a :-- Configuring incomplete, errors occurred!
debug|arm64-v8a :See also "C:/Users/konek/StudioProjects/libmedia/app/.externalNativeBuild/cmake/debug/arm64-v8a/CMakeFiles/CMakeOutput.log".
debug|arm64-v8a :See also "C:/Users/konek/StudioProjects/libmedia/app/.externalNativeBuild/cmake/debug/arm64-v8a/CMakeFiles/CMakeError.log".
release|armeabi-v7a :-- CMAKE_CXX_FLAGS=-g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -march=armv7-a -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -march=armv7-a -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -march=armv7-a -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -v -std=c++17 -v -std=c++17 -v -std=c++17
release|armeabi-v7a :-- CMAKE_CXX_FLAGS= -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -march=armv7-a -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -march=armv7-a -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -march=armv7-a -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -v -std=c++17 -v -std=c++17 -v -std=c++17
release|arm64-v8a :-- CMAKE_CXX_FLAGS=-g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -v -std=c++17 -v -std=c++17 -v -std=c++17
release|arm64-v8a :-- CMAKE_CXX_FLAGS= -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -v -std=c++17 -v -std=c++17 -v -std=c++17
release|armeabi-v7a :-- C++ compiler: Clang 8.0 C:/Users/konek/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
release|armeabi-v7a :-- CMAKE_SYSTEM_PROCESSOR=armv7-a
release|armeabi-v7a :-- CPU_ARCH=detect
release|armeabi-v7a :CMake Error at resampler/kfr/CMakeLists.txt:181 (install):
release|armeabi-v7a : install TARGETS given no LIBRARY DESTINATION for shared library target
release|armeabi-v7a : "kfr_io".
release|armeabi-v7a :CMake Error at resampler/kfr/CMakeLists.txt:184 (install):
release|armeabi-v7a : install TARGETS given no LIBRARY DESTINATION for shared library target
release|armeabi-v7a : "kfr_dft".
release|arm64-v8a :-- C++ compiler: Clang 8.0 C:/Users/konek/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
release|arm64-v8a :-- CMAKE_SYSTEM_PROCESSOR=aarch64
release|armeabi-v7a :-- Configuring incomplete, errors occurred!
release|armeabi-v7a :See also "C:/Users/konek/StudioProjects/libmedia/app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/CMakeOutput.log".
release|armeabi-v7a :See also "C:/Users/konek/StudioProjects/libmedia/app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/CMakeError.log".
release|arm64-v8a :-- CPU_ARCH=detect
release|arm64-v8a :CMake Error at resampler/kfr/CMakeLists.txt:181 (install):
release|arm64-v8a : install TARGETS given no LIBRARY DESTINATION for shared library target
release|arm64-v8a : "kfr_io".
release|arm64-v8a :CMake Error at resampler/kfr/CMakeLists.txt:184 (install):
release|arm64-v8a : install TARGETS given no LIBRARY DESTINATION for shared library target
release|arm64-v8a : "kfr_dft".
release|arm64-v8a :-- Configuring incomplete, errors occurred!
release|arm64-v8a :See also "C:/Users/konek/StudioProjects/libmedia/app/.externalNativeBuild/cmake/release/arm64-v8a/CMakeFiles/CMakeOutput.log".
release|arm64-v8a :See also "C:/Users/konek/StudioProjects/libmedia/app/.externalNativeBuild/cmake/release/arm64-v8a/CMakeFiles/CMakeError.log".

clang 7 build failed

include/kfr/dsp/goertzel.hpp:99:16: error: flexible array member 'result' with type 'complex<T> []' is not at the end of struct complex<T> result[];

should be:

...
    vec<T, width> q2;
    complex<T> result[];
};

Unexpected results with non-power of 2 real DFT

I am getting unexpected results for non-power of 2 DFT. I am using KFR version 3.0.9 with Clang compiler version 6.0.0 and testing on Ubuntu 18.04.

My test code is as follows:

#include <kfr/base.hpp>
#include <kfr/dft.hpp>
#include <kfr/dsp.hpp>

using namespace kfr;

int main() {
    println(library_version());
    constexpr size_t N = 63;
    const double fs = 1000.;
    const double ts = 1 / fs;
    univector<double, N> t = linspace(0., N * ts, N);
    univector<double, N> s = 0.7 * sin(2 * constants<double>::pi * 50 * t) + sin(2 * constants<double>::pi * 120 * t);
    univector<complex<double>> S(N);
    const dft_plan_real<double> dft(N);
    univector<u8> temp(dft.temp_size);
    dft.execute(S, s, temp);
    println("Sum of signal values: ", sum(s));
    println("DC component of DFT : ", S[0].real());
    return 0;
}

When I compile and run the above code, I get the following output:

Sum of signal values: 3.24885
DC component of DFT : 2.46928

I expected the first component of the DFT to be the same as the sum of the signal values.

For comparison purposes, I created a corresponding Python test script (Python 3.7.3 with NumPy 1.16.2):

import numpy as np
fs = 1000.
ts = 1 / fs
N = 63
t = np.linspace(0., N * ts, N, endpoint=False)
s = 0.7 * np.sin(2 * np.pi * 50. * t) + np.sin(2 * np.pi * 120. * t)
S = np.fft.rfft(s)
print("Sum of signal values: ", np.sum(s))
print("DC component of DFT : ", S[0].real)

Output from the Python script is:

Sum of signal values:  3.248853363223806
DC component of DFT :  3.248853363223807

This is what I expected. Note also that the sum of the signal values in the Python case agrees with the KFR case. However, the first component of the DFT differs (and in fact, all values of the DFT differ).

If I change the value of N from 63 to 64 and rerun, I get this result from KFR:

Sum of signal values: 3.44704
DC component of DFT : 3.44704

This agrees with the result from Python:

Sum of signal values:  3.447040706601597
DC component of DFT :  3.447040706601598

So power of 2 size DFT works as expected, but non-power of 2 size DFT does not.

Am I calling the DFT functions in KFR incorrectly?

How to build on Visual Studio 2017 with openMP support

I followed https://github.com/kfrlib/kfr#visual-studio-ide on Windows 10

When I try to include one of kfr file I get:

error : clang-cl does not support OpenMP (/openmp). This file cannot be compiled.

I installed LLVM 7.0.1 where clang should have openMP support.

I've tried adding -Xclang -fopenmp in VS Configuration Properties > LLVM > Additional Compiler Options, to no avail.

Do you know how to make openMP work with kfr on Windows with Visual Studio 2017?

KFR_STD_COMPLEX causes C2386 in Visual Studio 2017

When trying to define KFR_STD_COMPLEX, I get the following error;

1>kfr-master\include\kfr\base\complex.hpp(51): error C2386: 'complex': a symbol with this name already exists in the current scope

My specifications:
Windows 10
Visual Studio 2017
_MSV_VER == 1910

Minimum reproduction code:

#define KFR_STD_COMPLEX
#include "kfr/dsp.hpp"

int main()
{
	return 0;
}

How to use KFR in Xcode?

I wonder how I can use KFR as a framework in my Xcode Project.

Does anyone have any idea?

Thanks.

g++ 7.1.1 and vec: requested alignment is not an integer constant

Hi. I have a compilation error in the master branch of kfr.

On an attempt to use the DFT with Linux and gcc 7.1.1, the following error is produced:

thirdparty/kfr/include/kfr/base/simd_intrin.hpp: In instantiation of ‘struct kfr::vec<float, 4>’:
thirdparty/kfr/include/kfr/base/simd_x86.hpp:11:44:   required from here
thirdparty/kfr/include/kfr/base/simd_intrin.hpp:136:97: error: requested alignment is not an integer constant
 struct alignas(const_min(platform<>::maximum_vector_alignment, sizeof(T) * next_poweroftwo(N))) vec

origin of the error

From what I observe, recent gcc refuses to accept the parameter of alignas as a compile time constant.
On the same machine I have also tested with clang and gcc5 and it builds with these other compilers.

build error on raspberry pi

python build.py
threads = 1
-- Clang found
-- C++ compiler: Clang 3.8.1 /usr/bin/clang++-3.8
-- Could NOT find MPFR (missing: MPFR_INCLUDE_DIR MPFR_LIBRARIES)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/exp/assistant-sdk-cpp/vendor/kfr/build
[ 3%] Building CXX object examples/CMakeFiles/biquads.dir/biquads.cpp.o
Stack dump:
0. Program arguments: /usr/lib/llvm-3.8/bin/clang -cc1 -triple armv6kz--linux-gnueabihf -emit-obj -disable-free -disable-llvm-verifier -main-file-name biquads.cpp -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -fuse-init-array -target-cpu arm1176jzf-s -target-feature +strict-align -target-abi aapcs-linux -mfloat-abi hard -dwarf-column-info -debugger-tuning=gdb -coverage-file /home/pi/exp/assistant-sdk-cpp/vendor/kfr/build/examples/CMakeFiles/biquads.dir/biquads.cpp.o -resource-dir /usr/lib/llvm-3.8/bin/../lib/clang/3.8.1 -I /home/pi/exp/assistant-sdk-cpp/vendor/kfr/examples/../include -D NDEBUG -internal-isystem /usr/bin/../lib/gcc/arm-linux-gnueabihf/6.3.0/../../../../include/c++/6.3.0 -internal-isystem /usr/bin/../lib/gcc/arm-linux-gnueabihf/6.3.0/../../../../include/arm-linux-gnueabihf/c++/6.3.0 -internal-isystem /usr/bin/../lib/gcc/arm-linux-gnueabihf/6.3.0/../../../../include/arm-linux-gnueabihf/c++/6.3.0 -internal-isystem /usr/bin/../lib/gcc/arm-linux-gnueabihf/6.3.0/../../../../include/c++/6.3.0/backward -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-3.8/bin/../lib/clang/3.8.1/include -internal-externc-isystem /usr/include/arm-linux-gnueabihf -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -std=c++1y -fdeprecated-macro -fdebug-compilation-dir /home/pi/exp/assistant-sdk-cpp/vendor/kfr/build/examples -ferror-limit 19 -fmessage-length 128 -fallow-half-arguments-and-returns -fno-rtti -fno-signed-char -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o CMakeFiles/biquads.dir/biquads.cpp.o -x c++ /home/pi/exp/assistant-sdk-cpp/vendor/kfr/examples/biquads.cpp

  1. /home/pi/exp/assistant-sdk-cpp/vendor/kfr/examples/../include/kfr/base/platform.hpp:76:52: current parser token ';'
  2. /home/pi/exp/assistant-sdk-cpp/vendor/kfr/examples/../include/kfr/base/platform.hpp:30:1: parsing namespace 'kfr'
  3. /home/pi/exp/assistant-sdk-cpp/vendor/kfr/examples/../include/kfr/base/platform.hpp:67:1: parsing namespace 'internal'
    clang: error: unable to execute command: Segmentation fault
    clang: error: clang frontend command failed due to signal (use -v to see invocation)
    clang version 3.8.1-24+rpi1 (tags/RELEASE_381/final)
    Target: armv6--linux-gnueabihf
    Thread model: posix
    InstalledDir: /usr/bin
    clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
    clang: note: diagnostic msg:

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/biquads-b58be5.cpp
clang: note: diagnostic msg: /tmp/biquads-b58be5.sh
clang: note: diagnostic msg:


examples/CMakeFiles/biquads.dir/build.make:62: recipe for target 'examples/CMakeFiles/biquads.dir/biquads.cpp.o' failed
make[2]: *** [examples/CMakeFiles/biquads.dir/biquads.cpp.o] Error 254
CMakeFiles/Makefile2:93: recipe for target 'examples/CMakeFiles/biquads.dir/all' failed
make[1]: *** [examples/CMakeFiles/biquads.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "build.py", line 52, in
if subprocess.call(['cmake', '--build', '.', '--', '-j' + threads], cwd=build_dir): raise Exception('Can't build project')
Exception: Can't build project

Documentation: IO, audio formats

Hi,

is there any documentation/examples on how to read input from a file or convert existing data to KFR data types?

What audio formats are supported?

Thank you.

Unexpected resulls with even-numbered highpass filter size

The filter coefficients created by the following code plots the following seemingly low-pass filter:

    auto kaiser = to_pointer(kfr::window_kaiser(128, 3.0));

    kfr::univector<dd::fbase, 128> sClutter_coeff;
    kfr::fir_highpass(sClutter_coeff, 0.1, kaiser, true);

    for (auto c : sClutter_coeff) {
        std::cout << c << "\t";
    }

image

Note that I used the kfr::fir_highpass function.

kfrlib doesn't work at Qt 5.7.0

Hi dlevin256,
When I build my Qt project, it gives me the compile output, like this:

/home/bearsuny/Libs/kfr-1.2.0/include/kfr/base/min_max.hpp:43: error: cannot convert ‘const simd_t {aka const __vector(16) unsigned char}’ to ‘__m128i {aka __vector(2) long long int}’ for argument ‘1’ to ‘__m128i _mm_min_epu8(__m128i, __m128i)’
And my project is simple, like this
#include <QCoreApplication>
#include <iostream>
#include <kfr/dft.hpp>
using namespace kfr;
using namespace std;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
return a.exec();
}
The .pro file:
QT += core
QT -= gui
CONFIG += c++14
TARGET = PipeMonitor
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
INCLUDEPATH += /home/bearsuny/Libs/kfr-1.2.0/include
the version of kfrlib is 1.2.0 and I don't know that should I use kfrlib 1.0.0 or else? Thank you

[Feature Request] Dynamic Library Creation

Having kfr create a dynamic library (.so) during the build process, would make codebases that depend on kfr have more flexibility instead of static libraries (.a) that are currently built. Having both shouldn't be a problem either.

Resampling problem ?

  //Will use namespace kfr
    using namespace kfr;

    constexpr size_t input_sr  = 100;
    constexpr size_t output_sr = 50;

    //1Hz sine signal to be generated
    constexpr fbase frequency = 1.0;
    const univector<fbase, input_sr> o1 = sine(counter(0,1.0/input_sr) * 2.0 * constants<fbase>::pi * frequency);

    println("input_signal");
    println(o1.size());
    println(o1);

    //allocation of output vector
    univector<fbase> resampled(o1.size() * output_sr / input_sr);

    //Resampler
    auto r = resampler<fbase>(resample_quality::normal, output_sr, input_sr, 1.0, 0.496);

    println("output_signal");
    //Resample & get size
    const size_t destsize = r(resampled.data(), o1);
    println(destsize);
    println(resampled); 

I am trying to resample a 1Hz signal from sampling rate 100 to sampling rate 50.The sine wave is properly generated :

input_signal
100
0 0.0627905 0.125333 0.187381 0.24869 0.309017 0.368125 0.42578
0.481754 0.535827 0.587786 0.637425 0.684548 0.728969 0.770513 0.809017
0.844327 0.876306 0.904826 0.929776 0.951056 0.968583 0.982288 0.992116
0.998027 0.999999 0.998027 0.992116 0.982288 0.968583 0.951056 0.929776
0.904826 0.876306 0.844327 0.809017 0.770513 0.728969 0.684548 0.637425
0.587786 0.535827 0.481754 0.42578 0.368125 0.309017 0.24869 0.187381
0.125333 0.0627905 0 -0.063 -0.125333 -0.187381 -0.24869 -0.309017
-0.368125 -0.42578 -0.481754 -0.535827 -0.587786 -0.637425 -0.684548 -0.728969
-0.770513 -0.809017 -0.844327 -0.876306 -0.904826 -0.929776 -0.951056 -0.968583
-0.982288 -0.992116 -0.998027 -0.999999 -0.998027 -0.992116 -0.982288 -0.968583
-0.951056 -0.929776 -0.904826 -0.876306 -0.844327 -0.809017 -0.770513 -0.728969
-0.684548 -0.637425 -0.587786 -0.535827 -0.481754 -0.42578 -0.368125 -0.309017
-0.24869 -0.187381 -0.125333 -0.063

But the resampled data is not correct :
output_signal
50
0 -5.4e-11 -8.5e-09 1.8e-08 -3.6e-08 5.5e-08 -8.2e-08 1.1e-07
-1.5e-07 1.9e-07 -2.4e-07 2.9e-07 -3.5e-07 4.2e-07 -4.8e-07 5.6e-07
-6.4e-07 7.3e-07 -8.2e-07 9.3e-07 -1e-06 1.1e-06 -1.3e-06 1.4e-06
-1.5e-06 1.6e-06 -1.8e-06 1.9e-06 -2.1e-06 2.2e-06 -2.4e-06 2.5e-06
-2.7e-06 2.9e-06 -3e-06 3.2e-06 -3.4e-06 3.5e-06 -3.7e-06 3.8e-06
-4e-06 4.1e-06 -4.3e-06 4.4e-06 -4.5e-06 4.6e-06 -4.7e-06 4.8e-06
-4.9e-06 4.9e-06

The code is based on the sample_rate_conversion.cpp example. I am doing something wrong ?

error with bitcast

Hello,

I'm trying to use the latest version of the kfrlib with VS2017 and I get these errors:

constants.hpp(145): error C3861: 'bitcast': identifier not found
constants.hpp(191): note: see reference to class template instantiation 'kfr::constants' being compiled
constants.hpp(149): error C3861: 'bitcast': identifier not found
constants.hpp(179): error C3861: 'bitcast': identifier not found
constants.hpp(183): error C3861: 'bitcast': identifier not found

and my test application is as simple as this:

#include <kfr/all.hpp>
using namespace kfr;

int main()
{
return 0;
}

kill special_constant::undefined

The enum class special_constant (cometa.hpp:1989) contains an undefined field.
The function template <typename T> constexpr T special_value::get() const CMT_NOEXCEPT tries to instantiate and return an unititialized T(cometa.hpp:2025), which is not allowed in a constexpr function.
Based on a quick grep, special_constant::undefined does not seem to be used anywhere.
Can it be removed?

EDIT: This regards the dev branch

Visual Studio Build issues

Hello, I'm trying to get KFR working in VS2015 but I am having some issues. I get quite a few errors when trying to build the entire solution so I've posted just the output when I try to build the DFT project.

I'm not overly experienced with C++ so please excuse my ignorance... I'm really excited to process some signals though!

thanks

1>------ Build started: Project: dft, Configuration: Debug Win32 ------
1>clang-cl.exe : warning : unknown argument ignored in clang-cl: '-fno-inline' [-Wunknown-argument]
1>clang-cl.exe : warning : argument unused during compilation: '/Gm-' [-Wunused-command-line-argument]
1> In file included from C:\Users\keith\libraries\kfr-1.2.0\examples\dft.cpp:9:
1> In file included from C:\Users\keith\libraries\kfr-1.2.0\examples..\include\kfr/dsp.hpp:34:
1>C:\Users\keith\libraries\kfr-1.2.0\examples..\include\kfr/dsp/goertzel.hpp(99,16): error : flexible array member 'result' with type 'complex []' is not at the end of struct
1> complex result[];
1> ^
1> C:\Users\keith\libraries\kfr-1.2.0\examples..\include\kfr/dsp/goertzel.hpp(100,25): note: next field declaration is here
1> const vec<T, width> omega;
1> ^
1> In file included from C:\Users\keith\libraries\kfr-1.2.0\examples\dft.cpp:10:
1> In file included from C:\Users\keith\libraries\kfr-1.2.0\examples..\include\kfr/io.hpp:27:
1> In file included from C:\Users\keith\libraries\kfr-1.2.0\examples..\include\kfr/io/audiofile.hpp:32:
1>C:\Users\keith\libraries\kfr-1.2.0\examples..\include\kfr/io/file.hpp(118,56): warning : 'fopen' is deprecated: This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
1> return internal::expression_sequential_file_reader(fopen(file_name.c_str(), "rb"));
1> ^
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt\stdio.h(206,20): note: 'fopen' has been explicitly marked deprecated here
1> Check_return _CRT_INSECURE_DEPRECATE(fopen_s)
1> ^
1> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vcruntime.h(269,55): note: expanded from macro '_CRT_INSECURE_DEPRECATE'
1> #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(
1> ^
1> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vcruntime.h(259,47): note: expanded from macro '_CRT_DEPRECATE_TEXT'
1> #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
1> ^
1> In file included from C:\Users\keith\libraries\kfr-1.2.0\examples\dft.cpp:10:
1> In file included from C:\Users\keith\libraries\kfr-1.2.0\examples..\include\kfr/io.hpp:27:
1> In file included from C:\Users\keith\libraries\kfr-1.2.0\examples..\include\kfr/io/audiofile.hpp:32:
1>C:\Users\keith\libraries\kfr-1.2.0\examples..\include\kfr/io/file.hpp(122,56): warning : 'fopen' is deprecated: This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
1> return internal::expression_sequential_file_writer(fopen(file_name.c_str(), "wb"));
1> ^
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt\stdio.h(206,20): note: 'fopen' has been explicitly marked deprecated here
1> Check_return _CRT_INSECURE_DEPRECATE(fopen_s)
1> ^
1> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vcruntime.h(269,55): note: expanded from macro '_CRT_INSECURE_DEPRECATE'
1> #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(
1> ^
1> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vcruntime.h(259,47): note: expanded from macro '_CRT_DEPRECATE_TEXT'
1> #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
1> ^
1> 2 warnings and 1 error generated.
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

Build Failure [GCC]

OS: ArchLinux
GCC: 9.1
kfr: master ( 11d9a15) at the time of posting
EDIT: same errors reported with the dev branch as well ( 1b4afb3) at the time of posting

I am getting the following errors: error: requested alignment is not an integer constant.
This issue is very similar to #16, however, that issue was fixed for GCC 8.x, but now I am getting the same issue on GCC 9.1.

Here is a more complete sample of the output:

/home/acxz/vcs/github/acxz/kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/simd.hpp: In instantiation of ‘struct kfr::sse2::intrinsics::simd_array<short int, 8>’:
/home/acxz/vcs/github/acxz/kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/backend_generic.hpp:1118:31:   required from ‘T kfr::sse2::intrinsics::simd_get_element(kfr::sse2::intrinsics::simd<T, N1>&, std::size_t) [with T = short int; long unsigned int N = 8; kfr::sse2::intrinsics::simd<T, N1> = __vector(2) long long int; std::size_t = long unsigned int]’
/home/acxz/vcs/github/acxz/kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/vec.hpp:321:50:   required from ‘constexpr kfr::sse2::vec<T, N>::value_type kfr::sse2::vec<T, N>::get(std::size_t) const [with int dummy = 0; typename std::enable_if<((dummy == 0) && cometa::compound_type_traits<T>::is_scalar), cometa::details::unique_enum_impl<318>::type>::type <anonymous> = cometa::details::unique_enum_impl<318>::value; T = short int; long unsigned int N = 8; kfr::sse2::vec<T, N>::value_type = short int; std::size_t = long unsigned int]’
/home/acxz/vcs/github/acxz/kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/vec.hpp:308:107:   required from ‘constexpr kfr::sse2::vec<T, N>::value_type kfr::sse2::vec<T, N>::operator[](std::size_t) const & [with T = short int; long unsigned int N = 8; kfr::sse2::vec<T, N>::value_type = short int; std::size_t = long unsigned int]’
/home/acxz/vcs/github/acxz/kfr/include/kfr/io/impl/../../base/../simd/impl/basicoperators_generic.hpp:115:5:   required from here
/home/acxz/vcs/github/acxz/kfr/include/kfr/io/impl/../../base/../simd/impl/../../base/../simd/impl/simd.hpp:70:35: error: requested alignment is not an integer constant

Note: Clang 8.0 works fine.

Conan package

Hello,
Do you know about Conan?
Conan is modern dependency manager for C++. And will be great if your library will be available via package manager for other developers.

Here you can find example, how you can create package for the library.

If you have any questions, just ask :-)

AMD support?

I am trying to use KFR on AMD CPU (AMD FX-8370): when i include any kfr header i get an error about undefined symbols that are intel-specific. Does KFR really support AMD as stated in the README or do i need to use Intel CPU?

I am using Visual Studio 2017 and LLVM-vs2014_xp toolset w/ latest clang

1>------ Rebuild All started: Project: test_FFT, Configuration: Debug Win32 ------
1>clang-cl.exe : warning : argument unused during compilation: '/ZI' [-Wunused-command-line-argument]
1>clang-cl.exe : warning : argument unused during compilation: '/Gm' [-Wunused-command-line-argument]
1>In file included from test_FFT.cpp:9:
1>In file included from ..\include\kfr/dft/fft.hpp:25:
1>In file included from ..\include\kfr/dft/../base/complex.hpp:24:
1>In file included from ..\include\kfr/dft/../base/abs.hpp:27:
1>..\include\kfr/dft/../base/select.hpp(58,76): error : use of undeclared identifier '_mm_blendv_epi8'
1>    KFR_CPU_INTRIN(sse41) u8sse select(u8sse m, u8sse x, u8sse y) { return _mm_blendv_epi8(*y, *x, *m); }
1>                                                                           ^
1>..\include\kfr/dft/../base/select.hpp(59,80): error : use of undeclared identifier '_mm_blendv_epi8'
1>    KFR_CPU_INTRIN(sse41) u16sse select(u16sse m, u16sse x, u16sse y) { return _mm_blendv_epi8(*y, *x, *m); }
1>                                                                               ^
1>..\include\kfr/dft/../base/select.hpp(60,80): error : use of undeclared identifier '_mm_blendv_epi8'
1>    KFR_CPU_INTRIN(sse41) u32sse select(u32sse m, u32sse x, u32sse y) { return _mm_blendv_epi8(*y, *x, *m); }
1>                                                                               ^
1>..\include\kfr/dft/../base/select.hpp(61,80): error : use of undeclared identifier '_mm_blendv_epi8'
1>    KFR_CPU_INTRIN(sse41) u64sse select(u64sse m, u64sse x, u64sse y) { return _mm_blendv_epi8(*y, *x, *m); }
1>                                                                               ^
1>..\include\kfr/dft/../base/select.hpp(62,76): error : use of undeclared identifier '_mm_blendv_epi8'
1>    KFR_CPU_INTRIN(sse41) i8sse select(i8sse m, i8sse x, i8sse y) { return _mm_blendv_epi8(*y, *x, *m); }
1>                                                                           ^
1>..\include\kfr/dft/../base/select.hpp(63,80): error : use of undeclared identifier '_mm_blendv_epi8'
1>    KFR_CPU_INTRIN(sse41) i16sse select(i16sse m, i16sse x, i16sse y) { return _mm_blendv_epi8(*y, *x, *m); }
1>                                                                               ^
1>..\include\kfr/dft/../base/select.hpp(64,80): error : use of undeclared identifier '_mm_blendv_epi8'
1>    KFR_CPU_INTRIN(sse41) i32sse select(i32sse m, i32sse x, i32sse y) { return _mm_blendv_epi8(*y, *x, *m); }
1>                                                                               ^
1>..\include\kfr/dft/../base/select.hpp(65,80): error : use of undeclared identifier '_mm_blendv_epi8'
1>    KFR_CPU_INTRIN(sse41) i64sse select(i64sse m, i64sse x, i64sse y) { return _mm_blendv_epi8(*y, *x, *m); }
1>                                                                               ^
1>..\include\kfr/dft/../base/select.hpp(66,80): error : use of undeclared identifier '_mm_blendv_ps'
1>    KFR_CPU_INTRIN(sse41) f32sse select(f32sse m, f32sse x, f32sse y) { return _mm_blendv_ps(*y, *x, *m); }
1>                                                                               ^
1>..\include\kfr/dft/../base/select.hpp(67,80): error : use of undeclared identifier '_mm_blendv_pd'
1>    KFR_CPU_INTRIN(sse41) f64sse select(f64sse m, f64sse x, f64sse y) { return _mm_blendv_pd(*y, *x, *m); }
1>                                                                               ^
1>..\include\kfr/dft/../base/select.hpp(79,78): error : use of undeclared identifier '_mm256_blendv_pd'
1>    KFR_CPU_INTRIN(avx) f64avx select(f64avx m, f64avx x, f64avx y) { return _mm256_blendv_pd(*y, *x, *m); }
1>                                                                             ^
1>..\include\kfr/dft/../base/select.hpp(80,78): error : use of undeclared identifier '_mm256_blendv_ps'
1>    KFR_CPU_INTRIN(avx) f32avx select(f32avx m, f32avx x, f32avx y) { return _mm256_blendv_ps(*y, *x, *m); }
1>                                                                             ^
1>..\include\kfr/dft/../base/select.hpp(92,75): error : use of undeclared identifier '_mm256_blendv_epi8'
1>    KFR_CPU_INTRIN(avx2) u8avx select(u8avx m, u8avx x, u8avx y) { return _mm256_blendv_epi8(*y, *x, *m); }
1>                                                                          ^
1>..\include\kfr/dft/../base/select.hpp(95,16): error : use of undeclared identifier '_mm256_blendv_epi8'
1>        return _mm256_blendv_epi8(*y, *x, *m);
1>               ^
1>..\include\kfr/dft/../base/select.hpp(99,16): error : use of undeclared identifier '_mm256_blendv_epi8'
1>        return _mm256_blendv_epi8(*y, *x, *m);
1>               ^
1>..\include\kfr/dft/../base/select.hpp(103,16): error : use of undeclared identifier '_mm256_blendv_epi8'
1>        return _mm256_blendv_epi8(*y, *x, *m);
1>               ^
1>..\include\kfr/dft/../base/select.hpp(105,75): error : use of undeclared identifier '_mm256_blendv_epi8'
1>    KFR_CPU_INTRIN(avx2) i8avx select(i8avx m, i8avx x, i8avx y) { return _mm256_blendv_epi8(*y, *x, *m); }
1>                                                                          ^
1>..\include\kfr/dft/../base/select.hpp(108,16): error : use of undeclared identifier '_mm256_blendv_epi8'
1>        return _mm256_blendv_epi8(*y, *x, *m);
1>               ^
1>..\include\kfr/dft/../base/select.hpp(112,16): error : use of undeclared identifier '_mm256_blendv_epi8'
1>        return _mm256_blendv_epi8(*y, *x, *m);
1>               ^
1>CL : fatal error : too many errors emitted, stopping now [-ferror-limit=]
1>20 errors generated.
1>Done building project "test_FFT.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

mixdown_stereo doesn't work in Visual Studio 2015 Update 3

One of the function tests is failed in command line while passed in VS.

Visual Studio 2015 Update 3
clang 3.9.0 (release build)

KFR 1.3.0 avx 32-bit
[----RUN----] delay...
[--SUCCESS--] 10 subtests of 10
[----RUN----] fracdelay...
[--SUCCESS--] 4 subtests of 4
[----RUN----] mixdown...
[--SUCCESS--] 3 subtests of 3
[----RUN----] mixdown_stereo...
[---ERROR---] 2 subtests of 6
    [success] mid[0] == 100          | 100 == 100
    [success] side[0] == -100        | -100 == -100
    [success] mid[1] == 103          | 103 == 103
    [success] side[1] == -101        | -101 == -101
    [fail]    mid[20] == 160         | 2 == 160
    [fail]    side[20] == -120       | 2 == -120
[----RUN----] phasor...
[--SUCCESS--] 1 subtests of 1
===============================================================================
[--SUCCESS--] 4 tests
[---ERROR---] 1 tests

Build error on Ubuntu 16.04(g++ 5.4.0)

/home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/vec.hpp:1114:47: error: use of ‘kfr::avx2::test_function_abs()::<lambda(auto:104)> [with auto:104 = signed char]’ before deduction of ‘auto’
                 CHECK(std::is_same<decltype(fn(x)), typename compound_type_traits<T>::template rebind<
                                               ^
/home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/../testo/testo.hpp:407:69: note: in definition of macro ‘TESTO_CHECK’
         ::testo::active_test()->check(::testo::make_comparison() <= __VA_ARGS__, #__VA_ARGS__);              \
                                                                     ^
/home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/vec.hpp:1114:17: note: in expansion of macro ‘CHECK’
                 CHECK(std::is_same<decltype(fn(x)), typename compound_type_traits<T>::template rebind<
                 ^
In file included from /home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/mask.hpp:28:0,
                 from /home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/shuffle.hpp:28,
                 from /home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/expression.hpp:29,
                 from /home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/function.hpp:25,
                 from /home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/select.hpp:25,
                 from /home/administrator/work/kfr/include/kfr/math/impl/../../math/select.hpp:28,
                 from /home/administrator/work/kfr/include/kfr/math/impl/abs.hpp:25,
                 from /home/administrator/work/kfr/include/kfr/math/abs.hpp:28,
                 from /home/administrator/work/kfr/tests/unit/math/abs.cpp:7:
/home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/vec.hpp:1116:38: error: use of ‘kfr::avx2::test_function_abs()::<lambda(auto:104)> [with auto:104 = signed char]’ before deduction of ‘auto’
                 const auto fn_x  = fn(x);
                                      ^
In file included from /home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/impl/../../cometa/numeric.hpp:6:0,
                 from /home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/impl/specialconstants.hpp:25,
                 from /home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/types.hpp:31,
                 from /home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/platform.hpp:28,
                 from /home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/expression.hpp:28,
                 from /home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/function.hpp:25,
                 from /home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/select.hpp:25,
                 from /home/administrator/work/kfr/include/kfr/math/impl/../../math/select.hpp:28,
                 from /home/administrator/work/kfr/include/kfr/math/impl/abs.hpp:25,
                 from /home/administrator/work/kfr/include/kfr/math/abs.hpp:28,
                 from /home/administrator/work/kfr/tests/unit/math/abs.cpp:7:
/home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/impl/../../cometa/../cometa.hpp: In instantiation of ‘void cometa::details::cforeach_types_impl(cometa::ctypes_t<T0, types ...>, Fn&&, cometa::csizes_t<indices ...>) [with T0 = signed char; types = {short int, int, long int, unsigned char, short unsigned int, unsigned int, long unsigned int, float, kfr::avx2::vec<signed char, 1ul>, kfr::avx2::vec<signed char, 2ul>, kfr::avx2::vec<short int, 1ul>, kfr::avx2::vec<short int, 2ul>, kfr::avx2::vec<int, 1ul>, kfr::avx2::vec<int, 2ul>, kfr::avx2::vec<long int, 1ul>, kfr::avx2::vec<long int, 2ul>, kfr::avx2::vec<unsigned char, 1ul>, kfr::avx2::vec<unsigned char, 2ul>, kfr::avx2::vec<short unsigned int, 1ul>, kfr::avx2::vec<short unsigned int, 2ul>, kfr::avx2::vec<unsigned int, 1ul>, kfr::avx2::vec<unsigned int, 2ul>, kfr::avx2::vec<long unsigned int, 1ul>, kfr::avx2::vec<long unsigned int, 2ul>, kfr::avx2::vec<float, 1ul>, kfr::avx2::vec<float, 2ul>}; Fn = cometa::cforeach(A0&&, A1&&, Fn&&)::<lambda(auto:1)> [with auto:1 = cometa::special_value; A0 = const std::vector<cometa::special_value>&; A1 = cometa::ctypes_t<signed char, short int, int, long int, unsigned char, short unsigned int, unsigned int, long unsigned int, float, kfr::avx2::vec<signed char, 1ul>, kfr::avx2::vec<signed char, 2ul>, kfr::avx2::vec<short int, 1ul>, kfr::avx2::vec<short int, 2ul>, kfr::avx2::vec<int, 1ul>, kfr::avx2::vec<int, 2ul>, kfr::avx2::vec<long int, 1ul>, kfr::avx2::vec<long int, 2ul>, kfr::avx2::vec<unsigned char, 1ul>, kfr::avx2::vec<unsigned char, 2ul>, kfr::avx2::vec<short unsigned int, 1ul>, kfr::avx2::vec<short unsigned int, 2ul>, kfr::avx2::vec<unsigned int, 1ul>, kfr::avx2::vec<unsigned int, 2ul>, kfr::avx2::vec<long unsigned int, 1ul>, kfr::avx2::vec<long unsigned int, 2ul>, kfr::avx2::vec<float, 1ul>, kfr::avx2::vec<float, 2ul> >; Fn = testo::matrix(cometa::named_arg<T>&&, cometa::named_arg<Arg1>&&, Fn&&) [with Arg0 = const std::vector<cometa::special_value>&; Arg1 = cometa::ctypes_t<signed char, short int, int, long int, unsigned char, short unsigned int, unsigned int, long unsigned int, float, kfr::avx2::vec<signed char, 1ul>, kfr::avx2::vec<signed char, 2ul>, kfr::avx2::vec<short int, 1ul>, kfr::avx2::vec<short int, 2ul>, kfr::avx2::vec<int, 1ul>, kfr::avx2::vec<int, 2ul>, kfr::avx2::vec<long int, 1ul>, kfr::avx2::vec<long int, 2ul>, kfr::avx2::vec<unsigned char, 1ul>, kfr::avx2::vec<unsigned char, 2ul>, kfr::avx2::vec<short unsigned int, 1ul>, kfr::avx2::vec<short unsigned int, 2ul>, kfr::avx2::vec<unsigned int, 1ul>, kfr::avx2::vec<unsigned int, 2ul>, kfr::avx2::vec<long unsigned int, 1ul>, kfr::avx2::vec<long unsigned int, 2ul>, kfr::avx2::vec<float, 1ul>, kfr::avx2::vec<float, 2ul> >; Fn = kfr::avx2::test_function1(cometa::cint_t<val>, Fn&&, RefFn&&, IsApplicable&&) [with int Cat = 3; Fn = kfr::avx2::test_function_abs()::<lambda(auto:104)>; RefFn = kfr::avx2::test_function_abs()::<lambda(auto:105)>; IsApplicable = cometa::fn_return_constant<bool, true>; cometa::cint_t<val> = cometa::cval_t<int, 3>]::<lambda(cometa::special_value, auto:20)>]::<lambda(auto:11, auto:12)>]::<lambda(auto:2)>; long unsigned int ...indices = {0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 10ul, 11ul, 12ul, 13ul, 14ul, 15ul, 16ul, 17ul, 18ul, 19ul, 20ul, 21ul, 22ul, 23ul, 24ul, 25ul, 26ul}; cometa::csizes_t<indices ...> = cometa::cvals_t<long unsigned int, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 10ul, 11ul, 12ul, 13ul, 14ul, 15ul, 16ul, 17ul, 18ul, 19ul, 20ul, 21ul, 22ul, 23ul, 24ul, 25ul, 26ul>]’:
/home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/impl/../../cometa/../cometa.hpp:1413:33:   required from ‘void cometa::cforeach(cometa::ctypes_t<types1 ...>, Fn&&) [with Ts = {signed char, short int, int, long int, unsigned char, short unsigned int, unsigned int, long unsigned int, float, kfr::avx2::vec<signed char, 1ul>, kfr::avx2::vec<signed char, 2ul>, kfr::avx2::vec<short int, 1ul>, kfr::avx2::vec<short int, 2ul>, kfr::avx2::vec<int, 1ul>, kfr::avx2::vec<int, 2ul>, kfr::avx2::vec<long int, 1ul>, kfr::avx2::vec<long int, 2ul>, kfr::avx2::vec<unsigned char, 1ul>, kfr::avx2::vec<unsigned char, 2ul>, kfr::avx2::vec<short unsigned int, 1ul>, kfr::avx2::vec<short unsigned int, 2ul>, kfr::avx2::vec<unsigned int, 1ul>, kfr::avx2::vec<unsigned int, 2ul>, kfr::avx2::vec<long unsigned int, 1ul>, kfr::avx2::vec<long unsigned int, 2ul>, kfr::avx2::vec<float, 1ul>, kfr::avx2::vec<float, 2ul>}; Fn = cometa::cforeach(A0&&, A1&&, Fn&&)::<lambda(auto:1)> [with auto:1 = cometa::special_value; A0 = const std::vector<cometa::special_value>&; A1 = cometa::ctypes_t<signed char, short int, int, long int, unsigned char, short unsigned int, unsigned int, long unsigned int, float, kfr::avx2::vec<signed char, 1ul>, kfr::avx2::vec<signed char, 2ul>, kfr::avx2::vec<short int, 1ul>, kfr::avx2::vec<short int, 2ul>, kfr::avx2::vec<int, 1ul>, kfr::avx2::vec<int, 2ul>, kfr::avx2::vec<long int, 1ul>, kfr::avx2::vec<long int, 2ul>, kfr::avx2::vec<unsigned char, 1ul>, kfr::avx2::vec<unsigned char, 2ul>, kfr::avx2::vec<short unsigned int, 1ul>, kfr::avx2::vec<short unsigned int, 2ul>, kfr::avx2::vec<unsigned int, 1ul>, kfr::avx2::vec<unsigned int, 2ul>, kfr::avx2::vec<long unsigned int, 1ul>, kfr::avx2::vec<long unsigned int, 2ul>, kfr::avx2::vec<float, 1ul>, kfr::avx2::vec<float, 2ul> >; Fn = testo::matrix(cometa::named_arg<T>&&, cometa::named_arg<Arg1>&&, Fn&&) [with Arg0 = const std::vector<cometa::special_value>&; Arg1 = cometa::ctypes_t<signed char, short int, int, long int, unsigned char, short unsigned int, unsigned int, long unsigned int, float, kfr::avx2::vec<signed char, 1ul>, kfr::avx2::vec<signed char, 2ul>, kfr::avx2::vec<short int, 1ul>, kfr::avx2::vec<short int, 2ul>, kfr::avx2::vec<int, 1ul>, kfr::avx2::vec<int, 2ul>, kfr::avx2::vec<long int, 1ul>, kfr::avx2::vec<long int, 2ul>, kfr::avx2::vec<unsigned char, 1ul>, kfr::avx2::vec<unsigned char, 2ul>, kfr::avx2::vec<short unsigned int, 1ul>, kfr::avx2::vec<short unsigned int, 2ul>, kfr::avx2::vec<unsigned int, 1ul>, kfr::avx2::vec<unsigned int, 2ul>, kfr::avx2::vec<long unsigned int, 1ul>, kfr::avx2::vec<long unsigned int, 2ul>, kfr::avx2::vec<float, 1ul>, kfr::avx2::vec<float, 2ul> >; Fn = kfr::avx2::test_function1(cometa::cint_t<val>, Fn&&, RefFn&&, IsApplicable&&) [with int Cat = 3; Fn = kfr::avx2::test_function_abs()::<lambda(auto:104)>; RefFn = kfr::avx2::test_function_abs()::<lambda(auto:105)>; IsApplicable = cometa::fn_return_constant<bool, true>; cometa::cint_t<val> = cometa::cval_t<int, 3>]::<lambda(cometa::special_value, auto:20)>]::<lambda(auto:11, auto:12)>]::<lambda(auto:2)>]’
/home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/impl/../../cometa/../cometa.hpp:1422:26:   required from ‘cometa::cforeach(A0&&, A1&&, Fn&&)::<lambda(auto:1)> [with auto:1 = cometa::special_value; A0 = const std::vector<cometa::special_value>&; A1 = cometa::ctypes_t<signed char, short int, int, long int, unsigned char, short unsigned int, unsigned int, long unsigned int, float, kfr::avx2::vec<signed char, 1ul>, kfr::avx2::vec<signed char, 2ul>, kfr::avx2::vec<short int, 1ul>, kfr::avx2::vec<short int, 2ul>, kfr::avx2::vec<int, 1ul>, kfr::avx2::vec<int, 2ul>, kfr::avx2::vec<long int, 1ul>, kfr::avx2::vec<long int, 2ul>, kfr::avx2::vec<unsigned char, 1ul>, kfr::avx2::vec<unsigned char, 2ul>, kfr::avx2::vec<short unsigned int, 1ul>, kfr::avx2::vec<short unsigned int, 2ul>, kfr::avx2::vec<unsigned int, 1ul>, kfr::avx2::vec<unsigned int, 2ul>, kfr::avx2::vec<long unsigned int, 1ul>, kfr::avx2::vec<long unsigned int, 2ul>, kfr::avx2::vec<float, 1ul>, kfr::avx2::vec<float, 2ul> >; Fn = testo::matrix(cometa::named_arg<T>&&, cometa::named_arg<Arg1>&&, Fn&&) [with Arg0 = const std::vector<cometa::special_value>&; Arg1 = cometa::ctypes_t<signed char, short int, int, long int, unsigned char, short unsigned int, unsigned int, long unsigned int, float, kfr::avx2::vec<signed char, 1ul>, kfr::avx2::vec<signed char, 2ul>, kfr::avx2::vec<short int, 1ul>, kfr::avx2::vec<short int, 2ul>, kfr::avx2::vec<int, 1ul>, kfr::avx2::vec<int, 2ul>, kfr::avx2::vec<long int, 1ul>, kfr::avx2::vec<long int, 2ul>, kfr::avx2::vec<unsigned char, 1ul>, kfr::avx2::vec<unsigned char, 2ul>, kfr::avx2::vec<short unsigned int, 1ul>, kfr::avx2::vec<short unsigned int, 2ul>, kfr::avx2::vec<unsigned int, 1ul>, kfr::avx2::vec<unsigned int, 2ul>, kfr::avx2::vec<long unsigned int, 1ul>, kfr::avx2::vec<long unsigned int, 2ul>, kfr::avx2::vec<float, 1ul>, kfr::avx2::vec<float, 2ul> >; Fn = kfr::avx2::test_function1(cometa::cint_t<val>, Fn&&, RefFn&&, IsApplicable&&) [with int Cat = 3; Fn = kfr::avx2::test_function_abs()::<lambda(auto:104)>; RefFn = kfr::avx2::test_function_abs()::<lambda(auto:105)>; IsApplicable = cometa::fn_return_constant<bool, true>; cometa::cint_t<val> = cometa::cval_t<int, 3>]::<lambda(cometa::special_value, auto:20)>]::<lambda(auto:11, auto:12)>]’
/home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/impl/../../cometa/../cometa.hpp:1377:11:   required from ‘void cometa::cforeach(T&&, Fn&&) [with T = const std::vector<cometa::special_value>&; Fn = cometa::cforeach(A0&&, A1&&, Fn&&) [with A0 = const std::vector<cometa::special_value>&; A1 = cometa::ctypes_t<signed char, short int, int, long int, unsigned char, short unsigned int, unsigned int, long unsigned int, float, kfr::avx2::vec<signed char, 1ul>, kfr::avx2::vec<signed char, 2ul>, kfr::avx2::vec<short int, 1ul>, kfr::avx2::vec<short int, 2ul>, kfr::avx2::vec<int, 1ul>, kfr::avx2::vec<int, 2ul>, kfr::avx2::vec<long int, 1ul>, kfr::avx2::vec<long int, 2ul>, kfr::avx2::vec<unsigned char, 1ul>, kfr::avx2::vec<unsigned char, 2ul>, kfr::avx2::vec<short unsigned int, 1ul>, kfr::avx2::vec<short unsigned int, 2ul>, kfr::avx2::vec<unsigned int, 1ul>, kfr::avx2::vec<unsigned int, 2ul>, kfr::avx2::vec<long unsigned int, 1ul>, kfr::avx2::vec<long unsigned int, 2ul>, kfr::avx2::vec<float, 1ul>, kfr::avx2::vec<float, 2ul> >; Fn = testo::matrix(cometa::named_arg<T>&&, cometa::named_arg<Arg1>&&, Fn&&) [with Arg0 = const std::vector<cometa::special_value>&; Arg1 = cometa::ctypes_t<signed char, short int, int, long int, unsigned char, short unsigned int, unsigned int, long unsigned int, float, kfr::avx2::vec<signed char, 1ul>, kfr::avx2::vec<signed char, 2ul>, kfr::avx2::vec<short int, 1ul>, kfr::avx2::vec<short int, 2ul>, kfr::avx2::vec<int, 1ul>, kfr::avx2::vec<int, 2ul>, kfr::avx2::vec<long int, 1ul>, kfr::avx2::vec<long int, 2ul>, kfr::avx2::vec<unsigned char, 1ul>, kfr::avx2::vec<unsigned char, 2ul>, kfr::avx2::vec<short unsigned int, 1ul>, kfr::avx2::vec<short unsigned int, 2ul>, kfr::avx2::vec<unsigned int, 1ul>, kfr::avx2::vec<unsigned int, 2ul>, kfr::avx2::vec<long unsigned int, 1ul>, kfr::avx2::vec<long unsigned int, 2ul>, kfr::avx2::vec<float, 1ul>, kfr::avx2::vec<float, 2ul> >; Fn = kfr::avx2::test_function1(cometa::cint_t<val>, Fn&&, RefFn&&, IsApplicable&&) [with int Cat = 3; Fn = kfr::avx2::test_function_abs()::<lambda(auto:104)>; RefFn = kfr::avx2::test_function_abs()::<lambda(auto:105)>; IsApplicable = cometa::fn_return_constant<bool, true>; cometa::cint_t<val> = cometa::cval_t<int, 3>]::<lambda(cometa::special_value, auto:20)>]::<lambda(auto:11, auto:12)>]::<lambda(auto:1)>; typename std::enable_if<(cometa::details::has_begin_end_impl<typename std::decay<_Tp>::type>::value), cometa::details::unique_enum_impl<1372>::type>::type <anonymous> = (cometa::details::unique_enum_impl<1372>::type)1372]’
/home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/impl/../../cometa/../cometa.hpp:1420:13:   required from ‘void cometa::cforeach(A0&&, A1&&, Fn&&) [with A0 = const std::vector<cometa::special_value>&; A1 = cometa::ctypes_t<signed char, short int, int, long int, unsigned char, short unsigned int, unsigned int, long unsigned int, float, kfr::avx2::vec<signed char, 1ul>, kfr::avx2::vec<signed char, 2ul>, kfr::avx2::vec<short int, 1ul>, kfr::avx2::vec<short int, 2ul>, kfr::avx2::vec<int, 1ul>, kfr::avx2::vec<int, 2ul>, kfr::avx2::vec<long int, 1ul>, kfr::avx2::vec<long int, 2ul>, kfr::avx2::vec<unsigned char, 1ul>, kfr::avx2::vec<unsigned char, 2ul>, kfr::avx2::vec<short unsigned int, 1ul>, kfr::avx2::vec<short unsigned int, 2ul>, kfr::avx2::vec<unsigned int, 1ul>, kfr::avx2::vec<unsigned int, 2ul>, kfr::avx2::vec<long unsigned int, 1ul>, kfr::avx2::vec<long unsigned int, 2ul>, kfr::avx2::vec<float, 1ul>, kfr::avx2::vec<float, 2ul> >; Fn = testo::matrix(cometa::named_arg<T>&&, cometa::named_arg<Arg1>&&, Fn&&) [with Arg0 = const std::vector<cometa::special_value>&; Arg1 = cometa::ctypes_t<signed char, short int, int, long int, unsigned char, short unsigned int, unsigned int, long unsigned int, float, kfr::avx2::vec<signed char, 1ul>, kfr::avx2::vec<signed char, 2ul>, kfr::avx2::vec<short int, 1ul>, kfr::avx2::vec<short int, 2ul>, kfr::avx2::vec<int, 1ul>, kfr::avx2::vec<int, 2ul>, kfr::avx2::vec<long int, 1ul>, kfr::avx2::vec<long int, 2ul>, kfr::avx2::vec<unsigned char, 1ul>, kfr::avx2::vec<unsigned char, 2ul>, kfr::avx2::vec<short unsigned int, 1ul>, kfr::avx2::vec<short unsigned int, 2ul>, kfr::avx2::vec<unsigned int, 1ul>, kfr::avx2::vec<unsigned int, 2ul>, kfr::avx2::vec<long unsigned int, 1ul>, kfr::avx2::vec<long unsigned int, 2ul>, kfr::avx2::vec<float, 1ul>, kfr::avx2::vec<float, 2ul> >; Fn = kfr::avx2::test_function1(cometa::cint_t<val>, Fn&&, RefFn&&, IsApplicable&&) [with int Cat = 3; Fn = kfr::avx2::test_function_abs()::<lambda(auto:104)>; RefFn = kfr::avx2::test_function_abs()::<lambda(auto:105)>; IsApplicable = cometa::fn_return_constant<bool, true>; cometa::cint_t<val> = cometa::cval_t<int, 3>]::<lambda(cometa::special_value, auto:20)>]::<lambda(auto:11, auto:12)>]’
/home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/../testo/testo.hpp:312:13:   required from ‘void testo::matrix(cometa::named_arg<T>&&, cometa::named_arg<Arg1>&&, Fn&&) [with Arg0 = const std::vector<cometa::special_value>&; Arg1 = cometa::ctypes_t<signed char, short int, int, long int, unsigned char, short unsigned int, unsigned int, long unsigned int, float, kfr::avx2::vec<signed char, 1ul>, kfr::avx2::vec<signed char, 2ul>, kfr::avx2::vec<short int, 1ul>, kfr::avx2::vec<short int, 2ul>, kfr::avx2::vec<int, 1ul>, kfr::avx2::vec<int, 2ul>, kfr::avx2::vec<long int, 1ul>, kfr::avx2::vec<long int, 2ul>, kfr::avx2::vec<unsigned char, 1ul>, kfr::avx2::vec<unsigned char, 2ul>, kfr::avx2::vec<short unsigned int, 1ul>, kfr::avx2::vec<short unsigned int, 2ul>, kfr::avx2::vec<unsigned int, 1ul>, kfr::avx2::vec<unsigned int, 2ul>, kfr::avx2::vec<long unsigned int, 1ul>, kfr::avx2::vec<long unsigned int, 2ul>, kfr::avx2::vec<float, 1ul>, kfr::avx2::vec<float, 2ul> >; Fn = kfr::avx2::test_function1(cometa::cint_t<val>, Fn&&, RefFn&&, IsApplicable&&) [with int Cat = 3; Fn = kfr::avx2::test_function_abs()::<lambda(auto:104)>; RefFn = kfr::avx2::test_function_abs()::<lambda(auto:105)>; IsApplicable = cometa::fn_return_constant<bool, true>; cometa::cint_t<val> = cometa::cval_t<int, 3>]::<lambda(cometa::special_value, auto:20)>]’
/home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/vec.hpp:1107:18:   required from ‘void kfr::avx2::test_function1(cometa::cint_t<val>, Fn&&, RefFn&&, IsApplicable&&) [with int Cat = 3; Fn = kfr::avx2::test_function_abs()::<lambda(auto:104)>; RefFn = kfr::avx2::test_function_abs()::<lambda(auto:105)>; IsApplicable = cometa::fn_return_constant<bool, true>; cometa::cint_t<val> = cometa::cval_t<int, 3>]’
/home/administrator/work/kfr/tests/unit/math/abs.cpp:16:73:   required from here
/home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/impl/../../cometa/../cometa.hpp:1402:39: error: use of ‘auto cometa::details::get_type_arg(cometa::ctypes_t<types2 ...>) [with long unsigned int index = 1ul; types = {signed char, short int, int, long int, unsigned char, short unsigned int, unsigned int, long unsigned int, float, kfr::avx2::vec<signed char, 1ul>, kfr::avx2::vec<signed char, 2ul>, kfr::avx2::vec<short int, 1ul>, kfr::avx2::vec<short int, 2ul>, kfr::avx2::vec<int, 1ul>, kfr::avx2::vec<int, 2ul>, kfr::avx2::vec<long int, 1ul>, kfr::avx2::vec<long int, 2ul>, kfr::avx2::vec<unsigned char, 1ul>, kfr::avx2::vec<unsigned char, 2ul>, kfr::avx2::vec<short unsigned int, 1ul>, kfr::avx2::vec<short unsigned int, 2ul>, kfr::avx2::vec<unsigned int, 1ul>, kfr::avx2::vec<unsigned int, 2ul>, kfr::avx2::vec<long unsigned int, 1ul>, kfr::avx2::vec<long unsigned int, 2ul>, kfr::avx2::vec<float, 1ul>, kfr::avx2::vec<float, 2ul>}]’ before deduction of ‘auto’
     swallow{ (fn(get_type_arg<indices>(type_list)), void(), 0)... };
                                       ^
/home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/impl/../../cometa/../cometa.hpp:1402:5: error: no matching function for call to ‘cometa::swallow::swallow(<brace-enclosed initializer list>)’
     swallow{ (fn(get_type_arg<indices>(type_list)), void(), 0)... };
     ^
/home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/impl/../../cometa/../cometa.hpp:1050:33: note: candidate: template<class ... T> constexpr cometa::swallow::swallow(T&& ...)
     CMT_MEM_INTRINSIC constexpr swallow(T&&...) CMT_NOEXCEPT
                                 ^
/home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/impl/../../cometa/../cometa.hpp:1050:33: note:   template argument deduction/substitution failed:
/home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/impl/../../cometa/../cometa.hpp:1047:8: note: candidate: constexpr cometa::swallow::swallow(const cometa::swallow&)
 struct swallow
        ^
/home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/impl/../../cometa/../cometa.hpp:1047:8: note:   conversion of argument 1 would be ill-formed:
/home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/impl/../../cometa/../cometa.hpp:1047:8: note: candidate: constexpr cometa::swallow::swallow(cometa::swallow&&)
/home/administrator/work/kfr/include/kfr/math/impl/../../math/impl/../../simd/impl/../../base/../simd/impl/../../cometa/../cometa.hpp:1047:8: note:   conversion of argument 1 would be ill-formed:
tests/CMakeFiles/all_tests.dir/build.make:302: recipe for target 'tests/CMakeFiles/all_tests.dir/unit/math/abs.cpp.o' failed
make[2]: *** [tests/CMakeFiles/all_tests.dir/unit/math/abs.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:333: recipe for target 'tests/CMakeFiles/all_tests.dir/all' failed
make[1]: *** [tests/CMakeFiles/all_tests.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

‘__rdtsc’ was not declared in this scope on ARMv6

When compiling kfr with gcc-6.3 on the raspberrypi (ARMv6 architecture), compilation fails with the following error:

kfr/include/kfr/base/random.hpp: In constructor ‘kfr::random_bit_generator::random_bit_generator(kfr::seed_from_rdtsc_t)’:
kfr/include/kfr/base/random.hpp:46:48: error: ‘__rdtsc’ was not declared in this scope
 #define KFR_builtin_readcyclecounter() __rdtsc()
                                                ^
kfr/include/kfr/base/random.hpp:52:42: note: in expansion of macro ‘KFR_builtin_readcyclecounter’
         : state(bitcast<u32>(make_vector(KFR_builtin_readcyclecounter(),
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

convolve_filter destructor heap corruption

I am having sporadic issues with convolve_filter, which has been causing heap corruption errors when its destructor is called. I have implemented it in a simple wrapper class that constructs FIR filters and filters signals:

template<typename T, size_t size>
struct MP_FIR_c {

kfr::univector<T, size> IR;
kfr::convolve_filter<T> cfilt;

MP_FIR_c(const char* fname) : 
cfilt(size, size)
{
	std::fill(IR.begin(), IR.end(), 0.0f);
	FILE* filter = fopen(fname, "r");
	char c_buffer[20];
	size_t index = 0;
	while (fgets(c_buffer, 20, filter)) {
		IR[index] = atof(c_buffer);
		++index;
	}
	fclose(filter);
	cfilt.set_data(IR);
}

MP_FIR_c(const MP_FIR_c& from) :
	IR(from.IR),
	cfilt(IR, size)
{ }

MP_FIR_c(const std::vector<T>& from) :
	IR(from),
	cfilt(IR, size)
{ }

~MP_FIR_c() { 
};

/* filter using FFT overlap-add - destructive edit on in*/
template<size_t tag>
void overlap_add(kfr::univector<T, tag>& in) {
	cfilt.apply(in);
}

/* filter using FFT overlap-add - outputs to a new vector dest*/
template <size_t s1, size_t s2>
void overlap_add(kfr::univector<T, s1>& dest, const kfr::univector<T, s2>& src) {
	cfilt.apply(dest, src);
};

void overlap_add(double* sig, size_t size) {
	kfr::univector<double, 0> sig_vec(sig, size);
	cfilt.apply(sig_vec);
};

/* filter using time-domain convolution */
void convolve(kfr::univector<T>& dest, const kfr::univector<T>& src) {
	dest = fir(src, IR);
}

    /* OTHER METHODS VV */
};

The usage is typically along the lines of:

     double* sig = new double[sigSize];
     // read signal into sig
     MP_FIR_c<double, 8192> filter(filterFname);
     filter.overlap_add(sig, sigSize);

The error is not 100% consistent and I cannot figure out what could cause it. It happens when I call convolve_filter methods on other objects as well - not just instances of this class. I can sometimes get the error to temporarily go away by changing the block_size of the convolve_filter, but other times it works fine with the block_size equal to the size of the filter. In any case, the filtering is usually performed appropriately, and the heap corruption error appears when the convolve filter destructor is called.

stack trace:
KFR ConvolveFilter heap corruption call stack.txt

Environment:
Windows 10
Visual Studio 2015
LLVM-vs2014 / Clang 5.0

Zero latency biquad may access unaligned memory

If using an input expression that reads from aligned memory, you will get an unaligned memory read on this line: https://github.com/kfrlib/kfr/blob/master/include/kfr/dsp/biquad.hpp#L196 (depending on the value of Filters)

Original code:

    template <size_t width>
    KFR_INTRIN vec<T, width> operator()(cinput_t cinput, size_t index, vec_t<T, width> t) const
    {
        index += filters - 1;
        vec<T, width> out;
        if (index + width <= block_end)
        {
            const vec<T, width> in = this->argument_first(cinput, index, t);

            CMT_LOOP_UNROLL
            for (size_t i = 0; i < width; i++)
            {
                state.out = process(bq, state, insertleft(in[i], state.out));
                out[i]    = state.out[filters - 1];
            }
     //...

Suggested fix:

    template <size_t width>
    KFR_INTRIN vec<T, width> operator()(cinput_t cinput, size_t index, vec_t<T, width> t) const
    {
        index += filters - 1;
        vec<T, width> out;
        if (index + width <= block_end)
        {
            CMT_LOOP_UNROLL
            for (size_t i = 0; i < width; i++)
            {
		const vec<T, 1> in = this->argument_first(cinput, index + i, vec_t<T, 1>());

                state.out = process(bq, state, insertleft(in[0], state.out));
                out[i]    = state.out[filters - 1];
            }
     //... 

Bug in zero latency biquad

I think the indexing in expression_biquads::begin_block is wrong:

CMT_INLINE void begin_block(cinput_t cinput, size_t size) const
{
   block_end = size;
   for (size_t i = 0; i < filters - 1; i++)
   {
      const vec<T, 1> in = this->argument_first(cinput, i, vec_t<T, 1>());

      // here I think in[i] is wrong, should be in[0] or change way line above works
      state.out = process(bq, state, insertleft(in[i], state.out));
   }
}

If there were some range checks in the debug build it would catch this type of thing.

I think the same problems exists here as well:
https://github.com/kfrlib/kfr/blob/master/include/kfr/dsp/biquad.hpp#L222

[Implementation] Implementing a simple low pass filter

I would like to use this library to implementing a low pass filter, instead of writing my own low pass filter, however, after spending some time looking at the examples and the documentation I am a bit lost in whether I can achieve what I want with kfr. If anyone could help me/point me in the right direction it would be much appreciated. Forgive me for my naivety I am not too exposed to DSP.

Problem:
I am receiving a data stream of samples (digital, just doubles) along with their associated timestamps. When I sample this data stream the data is noisy, as such I would like convert the sampled output of the data stream to a filtered less noisy sample, say filtering out data greater than some cutoff frequency.
Note: I would not like to keep track of all the previous samples, (I know I need to keep track of the previous sample based on (1st order) low pass filter equations I am familiar with).

From what I understand so far I can design parameters (taps) for a filter at specific cutoff frequencies and with a window method. However, after reading and running the example code on fir.cpp and looking at the output images (amplitude and gain plots) I am not sure what the cutoff value actually means. It does not seem to represent cutoff frequencies for a filter.

From the output taps of designing the filter I can create a filter. Now my question is how I can use my filter on individual samples rather than the entire datastream. When I use filter.apply(output, input) can my input be a single sample? Another question I have is how to incorporate the associated timestamps along with the incoming samples? This information is vital for outputting a filtered sample.

After some more research it seems that an IIR filter is a solution to my problem instead of a FIR filter. However, kfr does not seem to have any implementations of IIR filters, however there are biquad implementations, but I am still not sure how to specify my dt when I apply the filter on a single sample.

As for the cutoff value, I know understand that to be the ratio: freq_cutoff/freq_sampling.

FFT, internal precision

Hi,

I wonder if it is possible to feed the FFT with a float input and output but use double internally for all the computation?

Or is it just faster/easier to use convert the buffers to doubles first then call the fft?

Thank you very much!

Alex

Overflow for small input lengths in zero latency biquad

In the zero latency biquad expression the begin_block may overflow if the input source is less than the number of filters - 1:

This line: https://github.com/kfrlib/kfr/blob/master/include/kfr/dsp/biquad.hpp#L178

This code block assumes the input source will be greater than or equal to filters - 1 in length:

    CMT_INLINE void begin_block(cinput_t cinput, size_t size) const
    {
        block_end = size;
        for (size_t i = 0; i < filters - 1; i++)
        {
            const vec<T, 1> in = this->argument_first(cinput, i, vec_t<T, 1>());
            state.out = process(bq, state, insertleft(in[0], state.out));
        }
    }

For real time audio applications this isn't going to be a good assumption for large numbers of filters.

Improve the FFT real documentation

Hi,

The documentation for the FFT is a little bit weak to me.

I don't understand very well how works the data layout.

Thank you very much!

Cant't compile with GCC5.4.0 Ubuntu16.40

As the Readme.md, I did the following things:
mkdir build && cd build
cmake -DENABLE_TESTS=ON -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release ..
make
And get some faults:
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp: In instantiation of 'kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t)::<lambda(auto:15)> [with auto:15 = cometa::cval_t<long unsigned int, 2ul>; bool is_final = true; T = float]':
/home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/../cometa.hpp:1407:18: required from 'decltype(auto) cometa::cswitch(cometa::cvals_t<T, first, rest ...>, cometa::identity, Fn&&, DefFn&&, CmpFn&&) [with T = long unsigned int; T v0 = 2ul; T ...values = {3ul, 4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 10ul}; Fn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = true; T = float; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, true>]::<lambda(auto:15)>; DefFn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = true; T = float; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, true>]::<lambda()>; CmpFn = cometa::fn_is_equal; cometa::identity = long unsigned int]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1322:19: required from 'void kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = true; T = float; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, true>]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1544:29: required from 'kfr::dft_plan::dft_plan(size_t, kfr::dft_order) [with T = float; size_t = long unsigned int]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-src.cpp:37:81: required from here
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1325:22: error: 'add_stage' was not declared in this scope
add_stage<conditional<is_final, internal::dft_stage_fixed_final_impl<T, val_of(radix)>,
^
In file included from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/types.hpp:40:0,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/constants.hpp:28,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/bitwise.hpp:28,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/operators.hpp:28,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/basic_expressions.hpp:28,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:29,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-src.cpp:27:
/home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/../cometa.hpp: In instantiation of 'decltype(auto) cometa::cswitch(cometa::cvals_t<T, first, rest ...>, cometa::identity, Fn&&, DefFn&&, CmpFn&&) [with T = long unsigned int; T v0 = 2ul; T ...values = {3ul, 4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 10ul}; Fn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = true; T = float; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, true>]::<lambda(auto:15)>; DefFn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = true; T = float; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, true>]::<lambda()>; CmpFn = cometa::fn_is_equal; cometa::identity = long unsigned int]':
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1322:19: required from 'void kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = true; T = float; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, true>]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1544:29: required from 'kfr::dft_plan::dft_plan(size_t, kfr::dft_order) [with T = float; size_t = long unsigned int]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-src.cpp:37:81: required from here
/home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/../cometa.hpp:1411:23: error: use of 'decltype(auto) cometa::cswitch(cometa::cvals_t<T, first, rest ...>, cometa::identity, Fn&&, DefFn&&, CmpFn&&) [with T = long unsigned int; T v0 = 3ul; T ...values = {4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 10ul}; Fn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = true; T = float; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, true>]::<lambda(auto:15)>; DefFn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = true; T = float; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, true>]::<lambda()>; CmpFn = cometa::fn_is_equal; cometa::identity = long unsigned int]' before deduction of 'auto'
return cswitch(cvals_t<T, values...>(), value, std::forward(fn), std::forward(deffn),
^
/home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/../cometa.hpp:1412:50: error: return-statement with a value, in function returning 'void' [-fpermissive]
std::forward(cmpfn));
^
In file included from /home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-src.cpp:27:0:
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp: In instantiation of 'kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t)::<lambda(auto:15)> [with auto:15 = cometa::cval_t<long unsigned int, 2ul>; bool is_final = false; T = float]':
/home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/../cometa.hpp:1407:18: required from 'decltype(auto) cometa::cswitch(cometa::cvals_t<T, first, rest ...>, cometa::identity, Fn&&, DefFn&&, CmpFn&&) [with T = long unsigned int; T v0 = 2ul; T ...values = {3ul, 4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 10ul}; Fn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = false; T = float; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, false>]::<lambda(auto:15)>; DefFn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = false; T = float; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, false>]::<lambda()>; CmpFn = cometa::fn_is_equal; cometa::identity = long unsigned int]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1322:19: required from 'void kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = false; T = float; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, false>]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1546:29: required from 'kfr::dft_plan::dft_plan(size_t, kfr::dft_order) [with T = float; size_t = long unsigned int]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-src.cpp:37:81: required from here
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1325:22: error: 'add_stage' was not declared in this scope
add_stage<conditional<is_final, internal::dft_stage_fixed_final_impl<T, val_of(radix)>,
^
In file included from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/types.hpp:40:0,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/constants.hpp:28,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/bitwise.hpp:28,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/operators.hpp:28,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/basic_expressions.hpp:28,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:29,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-src.cpp:27:
/home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/../cometa.hpp: In instantiation of 'decltype(auto) cometa::cswitch(cometa::cvals_t<T, first, rest ...>, cometa::identity, Fn&&, DefFn&&, CmpFn&&) [with T = long unsigned int; T v0 = 2ul; T ...values = {3ul, 4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 10ul}; Fn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = false; T = float; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, false>]::<lambda(auto:15)>; DefFn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = false; T = float; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, false>]::<lambda()>; CmpFn = cometa::fn_is_equal; cometa::identity = long unsigned int]':
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1322:19: required from 'void kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = false; T = float; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, false>]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1546:29: required from 'kfr::dft_plan::dft_plan(size_t, kfr::dft_order) [with T = float; size_t = long unsigned int]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-src.cpp:37:81: required from here
/home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/../cometa.hpp:1411:23: error: use of 'decltype(auto) cometa::cswitch(cometa::cvals_t<T, first, rest ...>, cometa::identity, Fn&&, DefFn&&, CmpFn&&) [with T = long unsigned int; T v0 = 3ul; T ...values = {4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 10ul}; Fn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = false; T = float; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, false>]::<lambda(auto:15)>; DefFn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = false; T = float; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, false>]::<lambda()>; CmpFn = cometa::fn_is_equal; cometa::identity = long unsigned int]' before deduction of 'auto'
return cswitch(cvals_t<T, values...>(), value, std::forward(fn), std::forward(deffn),
^
/home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/../cometa.hpp:1412:50: error: return-statement with a value, in function returning 'void' [-fpermissive]
std::forward(cmpfn));
^
In file included from /home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-src.cpp:27:0:
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp: In instantiation of 'kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t)::<lambda(auto:15)> [with auto:15 = cometa::cval_t<long unsigned int, 2ul>; bool is_final = true; T = double]':
/home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/../cometa.hpp:1407:18: required from 'decltype(auto) cometa::cswitch(cometa::cvals_t<T, first, rest ...>, cometa::identity, Fn&&, DefFn&&, CmpFn&&) [with T = long unsigned int; T v0 = 2ul; T ...values = {3ul, 4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 10ul}; Fn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = true; T = double; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, true>]::<lambda(auto:15)>; DefFn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = true; T = double; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, true>]::<lambda()>; CmpFn = cometa::fn_is_equal; cometa::identity = long unsigned int]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1322:19: required from 'void kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = true; T = double; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, true>]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1544:29: required from 'kfr::dft_plan::dft_plan(size_t, kfr::dft_order) [with T = double; size_t = long unsigned int]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-src.cpp:41:82: required from here
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1325:22: error: 'add_stage' was not declared in this scope
add_stage<conditional<is_final, internal::dft_stage_fixed_final_impl<T, val_of(radix)>,
^
In file included from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/types.hpp:40:0,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/constants.hpp:28,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/bitwise.hpp:28,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/operators.hpp:28,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/basic_expressions.hpp:28,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:29,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-src.cpp:27:
/home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/../cometa.hpp: In instantiation of 'decltype(auto) cometa::cswitch(cometa::cvals_t<T, first, rest ...>, cometa::identity, Fn&&, DefFn&&, CmpFn&&) [with T = long unsigned int; T v0 = 2ul; T ...values = {3ul, 4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 10ul}; Fn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = true; T = double; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, true>]::<lambda(auto:15)>; DefFn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = true; T = double; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, true>]::<lambda()>; CmpFn = cometa::fn_is_equal; cometa::identity = long unsigned int]':
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1322:19: required from 'void kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = true; T = double; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, true>]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1544:29: required from 'kfr::dft_plan::dft_plan(size_t, kfr::dft_order) [with T = double; size_t = long unsigned int]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-src.cpp:41:82: required from here
/home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/../cometa.hpp:1411:23: error: use of 'decltype(auto) cometa::cswitch(cometa::cvals_t<T, first, rest ...>, cometa::identity, Fn&&, DefFn&&, CmpFn&&) [with T = long unsigned int; T v0 = 3ul; T ...values = {4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 10ul}; Fn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = true; T = double; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, true>]::<lambda(auto:15)>; DefFn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = true; T = double; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, true>]::<lambda()>; CmpFn = cometa::fn_is_equal; cometa::identity = long unsigned int]' before deduction of 'auto'
return cswitch(cvals_t<T, values...>(), value, std::forward(fn), std::forward(deffn),
^
/home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/../cometa.hpp:1412:50: error: return-statement with a value, in function returning 'void' [-fpermissive]
std::forward(cmpfn));
^
In file included from /home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-src.cpp:27:0:
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp: In instantiation of 'kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t)::<lambda(auto:15)> [with auto:15 = cometa::cval_t<long unsigned int, 2ul>; bool is_final = false; T = double]':
/home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/../cometa.hpp:1407:18: required from 'decltype(auto) cometa::cswitch(cometa::cvals_t<T, first, rest ...>, cometa::identity, Fn&&, DefFn&&, CmpFn&&) [with T = long unsigned int; T v0 = 2ul; T ...values = {3ul, 4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 10ul}; Fn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = false; T = double; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, false>]::<lambda(auto:15)>; DefFn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = false; T = double; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, false>]::<lambda()>; CmpFn = cometa::fn_is_equal; cometa::identity = long unsigned int]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1322:19: required from 'void kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = false; T = double; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, false>]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1546:29: required from 'kfr::dft_plan::dft_plan(size_t, kfr::dft_order) [with T = double; size_t = long unsigned int]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-src.cpp:41:82: required from here
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1325:22: error: 'add_stage' was not declared in this scope
add_stage<conditional<is_final, internal::dft_stage_fixed_final_impl<T, val_of(radix)>,
^
In file included from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/types.hpp:40:0,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/constants.hpp:28,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/bitwise.hpp:28,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/operators.hpp:28,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/basic_expressions.hpp:28,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:29,
from /home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-src.cpp:27:
/home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/../cometa.hpp: In instantiation of 'decltype(auto) cometa::cswitch(cometa::cvals_t<T, first, rest ...>, cometa::identity, Fn&&, DefFn&&, CmpFn&&) [with T = long unsigned int; T v0 = 2ul; T ...values = {3ul, 4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 10ul}; Fn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = false; T = double; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, false>]::<lambda(auto:15)>; DefFn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = false; T = double; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, false>]::<lambda()>; CmpFn = cometa::fn_is_equal; cometa::identity = long unsigned int]':
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1322:19: required from 'void kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = false; T = double; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, false>]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1546:29: required from 'kfr::dft_plan::dft_plan(size_t, kfr::dft_order) [with T = double; size_t = long unsigned int]'
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-src.cpp:41:82: required from here
/home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/../cometa.hpp:1411:23: error: use of 'decltype(auto) cometa::cswitch(cometa::cvals_t<T, first, rest ...>, cometa::identity, Fn&&, DefFn&&, CmpFn&&) [with T = long unsigned int; T v0 = 3ul; T ...values = {4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 10ul}; Fn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = false; T = double; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, false>]::<lambda(auto:15)>; DefFn = kfr::dft_plan::prepare_dft_stage(size_t, size_t, size_t, cometa::cbool_t) [with bool is_final = false; T = double; size_t = long unsigned int; cometa::cbool_t = cometa::cval_t<bool, false>]::<lambda()>; CmpFn = cometa::fn_is_equal; cometa::identity = long unsigned int]' before deduction of 'auto'
return cswitch(cvals_t<T, values...>(), value, std::forward(fn), std::forward(deffn),
^
/home/yablon/some_fun/kfr/include/kfr/dft/impl/../../base/../cometa.hpp:1412:50: error: return-statement with a value, in function returning 'void' [-fpermissive]
std::forward(cmpfn));
^
/home/yablon/some_fun/kfr/include/kfr/dft/impl/dft-impl.hpp:1631: confused by earlier errors, bailing out
CMakeFiles/kfr_dft.dir/build.make:62: recipe for target 'CMakeFiles/kfr_dft.dir/include/kfr/dft/impl/dft-src.cpp.o' failed
make[2]: *** [CMakeFiles/kfr_dft.dir/include/kfr/dft/impl/dft-src.cpp.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/kfr_dft.dir/all' failed
make[1]: *** [CMakeFiles/kfr_dft.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Can you help me out? Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.