Closed
Description
Hello. Thanks for kissfft.
I'm building with code cloned from the repo today with VS2017. Here's a snippet that demonstrates the problem. Any thoughts welcomed.
[edit]
See https://github.com/mborgerding/kissfft/blob/master/kissfft.hh#L268 for the problem.
A fix can be hacked in by declaring scatchbuf thusly: std::vector<cpx_type> scratchbuf(p);
#include <complex>
#include <kissfft.h>
static void test()
{
typedef kissfft<float> fft_t;
typedef std::complex<float> fft_type;
const int nfft = 256;
fft_t fwd(nfft, false);
fft_t inv(nfft, true);
std::vector<fft_type> x(nfft, fft_type());
std::vector<fft_type> fx(nfft, fft_type());
x[0] = 2;
fwd.transform(&x[0], &fx[0]);
}
This gives the resulting error(s):
1>r:\src\xmos\lib_mp3_test_tools\xcorr\kissfft\kissfft.hh(268): error C2131: expression did not evaluate to a constant
1>r:\src\xmos\lib_mp3_test_tools\xcorr\kissfft\kissfft.hh(268): note: failure was caused by a read of a variable outside its lifetime
1>r:\src\xmos\lib_mp3_test_tools\xcorr\kissfft\kissfft.hh(268): note: see usage of 'p'
1>r:\src\xmos\lib_mp3_test_tools\xcorr\kissfft\kissfft.hh(263): note: while compiling class template member function 'void kissfft<float,kissfft_utils::traits<T_Scalar>>::kf_bfly_generic(std::complex<float> *,const size_t,int,int)'
1> with
1> [
1> T_Scalar=float
1> ]
1>r:\src\xmos\lib_mp3_test_tools\xcorr\kissfft\kissfft.hh(110): note: see reference to function template instantiation 'void kissfft<float,kissfft_utils::traits<T_Scalar>>::kf_bfly_generic(std::complex<float> *,const size_t,int,int)' being compiled
1> with
1> [
1> T_Scalar=float
1> ]
1>r:\src\xmos\lib_mp3_test_tools\xcorr\fftxcorr2.h(16): note: see reference to class template instantiation 'kissfft<float,kissfft_utils::traits<T_Scalar>>' being compiled
1> with
1> [
1> T_Scalar=float
1> ]
1>r:\src\xmos\lib_mp3_test_tools\xcorr\kissfft\kissfft.hh(273): error C3863: array type 'std::complex<float> [p]' is not assignable
1>Done building project "xcorr.vcxproj" -- FAILED.
Metadata
Metadata
Assignees
Labels
No labels