Registered Member
|
Hi there,
I'm trying to write overload a function to take either a real MatrixXd/MatrixXf, or a complex valued MatrixXcd/MatrixXcf. However, the compiler is complaining that the call is ambiguous...
The function prototypes are:
Any ideas as to why the compiler is complaining? thanks, -=Abe |
Moderator
|
I think the problem is that you are not calling fft_fwd2 with a Matrix** object but with an expression, here .real() I guess. It would be better to have a very generic fft_fwd2 function that will call an helper function specialized on the scalar type of the expression, e.g.:
template<typename T> typename fftw_fwd2_helper<typename T::Scalar>::return_type fft_fwd2(const T& A) { return fftw_fwd2_helper<typename T::Scalar>::run(A); } where fftw_fwd2_helper is a little struct with a typedef and a static function. |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]