既に MKL をサポートしているのと同じように、EigenのバックエンドとしてMAGMAを使用しようとしています。そうしている間に、上記のエラーに遭遇します。以下の関連するスニペット:
template <>
/*ERROR IN THIS LINE >>>>>*/ inline void assign_scalar_eig2magma<magmaDoubleComplex,dcomplex>(magmaDoubleComplex& magmaScalar, const dcomplex& eigenScalar) {
magmaScalar.x=eigenScalar.real();
magmaScalar.y=eigenScalar.imag();
}
は次のmagmaDoubleComplex
ように定義されていmagma_types.h
ます。
// ========================================
// define types specific to implementation (CUDA, OpenCL, MIC)
// define macros to deal with complex numbers
#if HAVE_CUBLAS
#include <cublas.h>
typedef cudaStream_t magma_queue_t;
typedef cudaEvent_t magma_event_t;
typedef int magma_device_t;
typedef cuDoubleComplex magmaDoubleComplex;
typedef cuFloatComplex magmaFloatComplex;
私が見る限り、magmaDoubleComplex
宣言されていますが、これはここでは問題ではないようです...
更新:確かに私の間違いです。ここでは、テンプレート定義は「mkl」であり、「magma」である必要があります。
template<typename MAGMAType, typename EigenType>
static inline void assign_scalar_eig2mkl(MAGMAType& magmaScalar, const EigenType& eigenScalar) {
magmaScalar=eigenScalar;
}