This forum has been archived. All content is frozen. Please use KDE Discuss instead.

CUDA and complex matrix multiplications

Tags: cuda, cuda, cuda cuda, cuda, cuda cuda, cuda, cuda
(comma "," separated)
flavianhautbois
Registered Member
Posts
7
Karma
0
OS
I have tried to test a program of mine on Eigen (current dev branch, updated today). It does not compile, and I have narrowed it down to a complex matrix multiplication:

Code: Select all
#include <Eigen/Dense>
using namespace Eigen;

void get_product(const MatrixXcf& A, const MatrixXcf& B)
{
        MatrixXcf C = A * B;
}


If I change MatrixXcf into MatrixXf then it compiles fine.

This is what is used to compile:
Code: Select all
/usr/local/cuda-6.5/bin/nvcc /usr/local/src/test/test.cu -c -o /usr/local/src/test/test.cu.o -m64 -DEIGEN_NO_DEBUG -DNVCC -I/usr/local/cuda-6.5/include -I/usr/local/eigen -I/usr/local/cuda-6.5/include


The errors are:
Code: Select all
/usr/local/eigen/Eigen/src/Core/Redux.h(200): error: a value of type "int" cannot be assigned to an entity of type "_ZNSt7complexIfE9_ComplexTE"

/usr/local/eigen/Eigen/src/Core/Redux.h(202): error: a value of type "int" cannot be assigned to an entity of type "_ZNSt7complexIfE9_ComplexTE"

/usr/local/eigen/Eigen/src/Core/Redux.h(205): error: a value of type "int" cannot be assigned to an entity of type "_ZNSt7complexIfE9_ComplexTE"

3 errors detected in the compilation of "/tmp/tmpxft_000040f4_00000000-7_***_******.cpp2.i".
CMake Error at ***_******_generated_***_******.cu.o.cmake:252 (message):
  Error generating file
  /usr/local/src/fingerprint/build/traxit_fingerprinting/CMakeFiles/***_******.dir//./***_******_generated_***_******.cu.o


I also get a long list of warnings:
Code: Select all
/usr/local/eigen/Eigen/src/Core/PlainObjectBase.h(486): warning: calling a __host__ function from a __host__ __device__ function is not allowed
          detected during:
            instantiation of "Eigen::PlainObjectBase<Derived>::PlainObjectBase(Eigen::PlainObjectBase<Derived>::Index, Eigen::PlainObjectBase<Derived>::Index, E
igen::PlainObjectBase<Derived>::Index) [with Derived=Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>]"
/usr/local/eigen/Eigen/src/Core/Matrix.h(334): here
            instantiation of "Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _M
axRows, _MaxCols> &) [with _Scalar=std::complex<float>, _Rows=-1, _Cols=-1, _Options=0, _MaxRows=-1, _MaxCols=-1]"

/usr/local/eigen/Eigen/src/Core/PlainObjectBase.h(263): warning: calling a __host__ function from a __host__ __device__ function is not allowed
          detected during:
            instantiation of "void Eigen::PlainObjectBase<Derived>::resize(Eigen::PlainObjectBase<Derived>::Index, Eigen::PlainObjectBase<Derived>::Index) [with
 Derived=Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>]"
/usr/local/eigen/Eigen/src/Core/AssignEvaluator.h(737): here
            instantiation of "void Eigen::internal::call_assignment_no_alias(Dst &, const Src &, const Func &) [with Dst=Eigen::Matrix<std::complex<float>, -1,
-1, 0, -1, -1>, Src=Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, Func=Eigen::internal::assign_op<std::complex<float>>]"
(666): here
            instantiation of "Derived &Eigen::PlainObjectBase<Derived>::_set_noalias(const Eigen::DenseBase<OtherDerived> &) [with Derived=Eigen::Matrix<std::co
mplex<float>, -1, -1, 0, -1, -1>, OtherDerived=Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>]"
/usr/local/eigen/Eigen/src/Core/Matrix.h(336): here
            instantiation of "Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _M
axRows, _MaxCols> &) [with _Scalar=std::complex<float>, _Rows=-1, _Cols=-1, _Options=0, _MaxRows=-1, _MaxCols=-1]"

/usr/local/eigen/Eigen/src/Core/functors/BinaryFunctors.h(66): warning: calling a __host__ function from a __host__ __device__ function is not allowed
          detected during:
            instantiation of "const Eigen::internal::scalar_product_op<LhsScalar, RhsScalar>::result_type Eigen::internal::scalar_product_op<LhsScalar, RhsScala
r>::operator()(const LhsScalar &, const RhsScalar &) const [with LhsScalar=std::complex<float>, RhsScalar=std::complex<float>]"
/usr/local/eigen/Eigen/src/Core/CoreEvaluators.h(478): here
            instantiation of "Eigen::internal::binary_evaluator<Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>, Eigen::internal::IndexBased, Eigen::internal::IndexBas
ed, Eigen::internal::traits<Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>::Lhs>::Scalar, Eigen::internal::traits<Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>::Rhs>::Scal
ar>::CoeffReturnType Eigen::internal::binary_evaluator<Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>, Eigen::internal::IndexBased, Eigen::internal::IndexBased, Eigen
::internal::traits<Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>::Lhs>::Scalar, Eigen::internal::traits<Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>::Rhs>::Scalar>::coef
f(Eigen::internal::binary_evaluator<Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>, Eigen::internal::IndexBased, Eigen::internal::IndexBased, Eigen::internal::traits<
Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>::Lhs>::Scalar, Eigen::internal::traits<Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>::Rhs>::Scalar>::Index, Eigen::internal:
:binary_evaluator<Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>, Eigen::internal::IndexBased, Eigen::internal::IndexBased, Eigen::internal::traits<Eigen::CwiseBinary
Op<BinaryOp, Lhs, Rhs>::Lhs>::Scalar, Eigen::internal::traits<Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>::Rhs>::Scalar>::Index) const [with BinaryOp=Eigen::intern
al::scalar_product_op<std::complex<float>, std::complex<float>>, Lhs=const Eigen::Transpose<const Eigen::Block<const Eigen::Matrix<std::complex<float>, -1, -1,
0, -1, -1>, 1, -1, false>>, Rhs=const Eigen::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, -1, 1, true>]"
/usr/local/eigen/Eigen/src/Core/Redux.h(386): here
            instantiation of "Eigen::internal::redux_evaluator<_XprType>::CoeffReturnType Eigen::internal::redux_evaluator<_XprType>::coeffByOuterInner(Eigen::i
nternal::redux_evaluator<_XprType>::Index, Eigen::internal::redux_evaluator<_XprType>::Index) const [with _XprType=Eigen::CwiseBinaryOp<Eigen::internal::scalar_
product_op<std::complex<float>, std::complex<float>>, const Eigen::Transpose<const Eigen::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 1,
-1, false>>, const Eigen::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, -1, 1, true>>]"
/usr/local/eigen/Eigen/src/Core/Redux.h(200): here
            instantiation of "Eigen::internal::redux_impl<Func, Derived, 0, 0>::Scalar Eigen::internal::redux_impl<Func, Derived, 0, 0>::run(const Derived &, co
nst Func &) [with Func=Eigen::internal::scalar_sum_op<std::complex<float>>, Derived=Eigen::internal::redux_evaluator<Eigen::CwiseBinaryOp<Eigen::internal::scala
r_product_op<std::complex<float>, std::complex<float>>, const Eigen::Transpose<const Eigen::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 1
, -1, false>>, const Eigen::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, -1, 1, true>>>]"
/usr/local/eigen/Eigen/src/Core/Redux.h(431): here
            instantiation of "Eigen::internal::result_of<BinaryOp (Eigen::internal::traits<Derived>::Scalar)>::type Eigen::DenseBase<Derived>::redux(const Binar
yOp &) const [with Derived=Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<std::complex<float>, std::complex<float>>, const Eigen::Transpose<const Eigen
::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 1, -1, false>>, const Eigen::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1,
-1>, -1, 1, true>>, BinaryOp=Eigen::internal::scalar_sum_op<std::complex<float>>]"
/usr/local/eigen/Eigen/src/Core/Redux.h(464): here
            [ 5 instantiation contexts not shown ]
            instantiation of "void Eigen::internal::call_dense_assignment_loop(const DstXprType &, const SrcXprType &, const Functor &) [with DstXprType=Eigen::
Matrix<std::complex<float>, -1, -1, 0, -1, -1>, SrcXprType=Eigen::Product<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<floa
t>, -1, -1, 0, -1, -1>, 3>, Functor=Eigen::internal::assign_op<std::complex<float>>]"
/usr/local/eigen/Eigen/src/Core/AssignEvaluator.h(775): here
            instantiation of "void Eigen::internal::Assignment<DstXprType, SrcXprType, Functor, Eigen::internal::Dense2Dense, Scalar>::run(DstXprType &, const S
rcXprType &, const Functor &) [with DstXprType=Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, SrcXprType=Eigen::Product<Eigen::Matrix<std::complex<float
>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 3>, Functor=Eigen::internal::assign_op<std::complex<float>>, Scalar=std::complex<f
loat>]"
/usr/local/eigen/Eigen/src/Core/AssignEvaluator.h(752): here
            instantiation of "void Eigen::internal::call_assignment_no_alias(Dst &, const Src &, const Func &) [with Dst=Eigen::Matrix<std::complex<float>, -1,
-1, 0, -1, -1>, Src=Eigen::Product<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 3>, Func=Eigen:
:internal::assign_op<std::complex<float>>]"
/usr/local/eigen/Eigen/src/Core/PlainObjectBase.h(666): here
            instantiation of "Derived &Eigen::PlainObjectBase<Derived>::_set_noalias(const Eigen::DenseBase<OtherDerived> &) [with Derived=Eigen::Matrix<std::co
mplex<float>, -1, -1, 0, -1, -1>, OtherDerived=Eigen::Product<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<float>, -1, -1,
0, -1, -1>, 3>]"
/usr/local/eigen/Eigen/src/Core/Matrix.h(328): here
            instantiation of "Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const Eigen::MatrixBase<OtherDerived> &) [with _Scalar=
std::complex<float>, _Rows=-1, _Cols=-1, _Options=0, _MaxRows=-1, _MaxCols=-1, OtherDerived=Eigen::Product<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>
, Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 3>]"
/usr/local/src/fingerprint/traxit_fingerprinting/***_******.cu(5): here

/usr/local/eigen/Eigen/src/Core/functors/BinaryFunctors.h(27): warning: calling a __host__ function from a __host__ __device__ function is not allowed
          detected during:
            instantiation of "const Scalar Eigen::internal::scalar_sum_op<Scalar>::operator()(const Scalar &, const Scalar &) const [with Scalar=std::complex<fl
oat>]"
/usr/local/eigen/Eigen/src/Core/Redux.h(202): here
            instantiation of "Eigen::internal::redux_impl<Func, Derived, 0, 0>::Scalar Eigen::internal::redux_impl<Func, Derived, 0, 0>::run(const Derived &, co
nst Func &) [with Func=Eigen::internal::scalar_sum_op<std::complex<float>>, Derived=Eigen::internal::redux_evaluator<Eigen::CwiseBinaryOp<Eigen::internal::scala
r_product_op<std::complex<float>, std::complex<float>>, const Eigen::Transpose<const Eigen::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 1
, -1, false>>, const Eigen::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, -1, 1, true>>>]"
/usr/local/eigen/Eigen/src/Core/Redux.h(431): here
            instantiation of "Eigen::internal::result_of<BinaryOp (Eigen::internal::traits<Derived>::Scalar)>::type Eigen::DenseBase<Derived>::redux(const Binar
yOp &) const [with Derived=Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<std::complex<float>, std::complex<float>>, const Eigen::Transpose<const Eigen
::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 1, -1, false>>, const Eigen::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1,
-1>, -1, 1, true>>, BinaryOp=Eigen::internal::scalar_sum_op<std::complex<float>>]"
/usr/local/eigen/Eigen/src/Core/Redux.h(464): here
            instantiation of "Eigen::DenseBase<Derived>::Scalar Eigen::DenseBase<Derived>::sum() const [with Derived=Eigen::CwiseBinaryOp<Eigen::internal::scala
r_product_op<std::complex<float>, std::complex<float>>, const Eigen::Transpose<const Eigen::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 1
, -1, false>>, const Eigen::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, -1, 1, true>>]"
/usr/local/eigen/Eigen/src/Core/ProductEvaluators.h(467): here
            instantiation of "const Eigen::internal::product_evaluator<Eigen::Product<Lhs, Rhs, 3>, ProductTag, Eigen::DenseShape, Eigen::DenseShape, Lhs::Scala
r, Rhs::Scalar>::CoeffReturnType Eigen::internal::product_evaluator<Eigen::Product<Lhs, Rhs, 3>, ProductTag, Eigen::DenseShape, Eigen::DenseShape, Lhs::Scalar,
Rhs::Scalar>::coeff(Eigen::internal::product_evaluator<Eigen::Product<Lhs, Rhs, 3>, ProductTag, Eigen::DenseShape, Eigen::DenseShape, Lhs::Scalar, Rhs::Scalar>:
:Index, Eigen::internal::product_evaluator<Eigen::Product<Lhs, Rhs, 3>, ProductTag, Eigen::DenseShape, Eigen::DenseShape, Lhs::Scalar, Rhs::Scalar>::Index) cons
t [with Lhs=Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, Rhs=Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, ProductTag=7]"
/usr/local/eigen/Eigen/src/Core/AssignEvaluator.h(564): here
            [ 3 instantiation contexts not shown ]
            instantiation of "void Eigen::internal::call_dense_assignment_loop(const DstXprType &, const SrcXprType &, const Functor &) [with DstXprType=Eigen::
Matrix<std::complex<float>, -1, -1, 0, -1, -1>, SrcXprType=Eigen::Product<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<floa
t>, -1, -1, 0, -1, -1>, 3>, Functor=Eigen::internal::assign_op<std::complex<float>>]"
/usr/local/eigen/Eigen/src/Core/AssignEvaluator.h(775): here
            instantiation of "void Eigen::internal::Assignment<DstXprType, SrcXprType, Functor, Eigen::internal::Dense2Dense, Scalar>::run(DstXprType &, const S
rcXprType &, const Functor &) [with DstXprType=Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, SrcXprType=Eigen::Product<Eigen::Matrix<std::complex<float
>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 3>, Functor=Eigen::internal::assign_op<std::complex<float>>, Scalar=std::complex<f
loat>]"
/usr/local/eigen/Eigen/src/Core/AssignEvaluator.h(752): here
            instantiation of "void Eigen::internal::call_assignment_no_alias(Dst &, const Src &, const Func &) [with Dst=Eigen::Matrix<std::complex<float>, -1,
-1, 0, -1, -1>, Src=Eigen::Product<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 3>, Func=Eigen:
:internal::assign_op<std::complex<float>>]"
/usr/local/eigen/Eigen/src/Core/PlainObjectBase.h(666): here
            instantiation of "Derived &Eigen::PlainObjectBase<Derived>::_set_noalias(const Eigen::DenseBase<OtherDerived> &) [with Derived=Eigen::Matrix<std::co
mplex<float>, -1, -1, 0, -1, -1>, OtherDerived=Eigen::Product<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<float>, -1, -1,
0, -1, -1>, 3>]"
/usr/local/eigen/Eigen/src/Core/Matrix.h(328): here
            instantiation of "Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const Eigen::MatrixBase<OtherDerived> &) [with _Scalar=
std::complex<float>, _Rows=-1, _Cols=-1, _Options=0, _MaxRows=-1, _MaxCols=-1, OtherDerived=Eigen::Product<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>
, Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 3>]"
/usr/local/src/fingerprint/traxit_fingerprinting/***_******.cu(5): here

/usr/local/eigen/Eigen/src/Core/Redux.h(199): warning: calling a __host__ function from a __host__ __device__ function is not allowed
          detected during:
            instantiation of "Eigen::internal::redux_impl<Func, Derived, 0, 0>::Scalar Eigen::internal::redux_impl<Func, Derived, 0, 0>::run(const Derived &, co
nst Func &) [with Func=Eigen::internal::scalar_sum_op<std::complex<float>>, Derived=Eigen::internal::redux_evaluator<Eigen::CwiseBinaryOp<Eigen::internal::scala
r_product_op<std::complex<float>, std::complex<float>>, const Eigen::Transpose<const Eigen::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 1
, -1, false>>, const Eigen::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, -1, 1, true>>>]"
(431): here
            instantiation of "Eigen::internal::result_of<BinaryOp (Eigen::internal::traits<Derived>::Scalar)>::type Eigen::DenseBase<Derived>::redux(const Binar
yOp &) const [with Derived=Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<std::complex<float>, std::complex<float>>, const Eigen::Transpose<const Eigen
::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 1, -1, false>>, const Eigen::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1,
-1>, -1, 1, true>>, BinaryOp=Eigen::internal::scalar_sum_op<std::complex<float>>]"
(464): here
            instantiation of "Eigen::DenseBase<Derived>::Scalar Eigen::DenseBase<Derived>::sum() const [with Derived=Eigen::CwiseBinaryOp<Eigen::internal::scala
r_product_op<std::complex<float>, std::complex<float>>, const Eigen::Transpose<const Eigen::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 1
, -1, false>>, const Eigen::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, -1, 1, true>>]"
/usr/local/eigen/Eigen/src/Core/ProductEvaluators.h(467): here
            instantiation of "const Eigen::internal::product_evaluator<Eigen::Product<Lhs, Rhs, 3>, ProductTag, Eigen::DenseShape, Eigen::DenseShape, Lhs::Scala
r, Rhs::Scalar>::CoeffReturnType Eigen::internal::product_evaluator<Eigen::Product<Lhs, Rhs, 3>, ProductTag, Eigen::DenseShape, Eigen::DenseShape, Lhs::Scalar,
Rhs::Scalar>::coeff(Eigen::internal::product_evaluator<Eigen::Product<Lhs, Rhs, 3>, ProductTag, Eigen::DenseShape, Eigen::DenseShape, Lhs::Scalar, Rhs::Scalar>:
:Index, Eigen::internal::product_evaluator<Eigen::Product<Lhs, Rhs, 3>, ProductTag, Eigen::DenseShape, Eigen::DenseShape, Lhs::Scalar, Rhs::Scalar>::Index) cons
t [with Lhs=Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, Rhs=Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, ProductTag=7]"
/usr/local/eigen/Eigen/src/Core/AssignEvaluator.h(564): here
            instantiation of "void Eigen::internal::generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>::assignCoeff(Eigen::
internal::generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>::Index, Eigen::internal::generic_dense_assignment_kernel<DstEv
aluatorTypeT, SrcEvaluatorTypeT, Functor, Version>::Index) [with DstEvaluatorTypeT=Eigen::internal::evaluator<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1,
-1>>, SrcEvaluatorTypeT=Eigen::internal::evaluator<Eigen::Product<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<float>, -1,
-1, 0, -1, -1>, 3>>, Functor=Eigen::internal::assign_op<std::complex<float>>, Version=0]"
/usr/local/eigen/Eigen/src/Core/AssignEvaluator.h(578): here
            [ 2 instantiation contexts not shown ]
            instantiation of "void Eigen::internal::call_dense_assignment_loop(const DstXprType &, const SrcXprType &, const Functor &) [with DstXprType=Eigen::
Matrix<std::complex<float>, -1, -1, 0, -1, -1>, SrcXprType=Eigen::Product<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<floa
t>, -1, -1, 0, -1, -1>, 3>, Functor=Eigen::internal::assign_op<std::complex<float>>]"
/usr/local/eigen/Eigen/src/Core/AssignEvaluator.h(775): here
            instantiation of "void Eigen::internal::Assignment<DstXprType, SrcXprType, Functor, Eigen::internal::Dense2Dense, Scalar>::run(DstXprType &, const S
rcXprType &, const Functor &) [with DstXprType=Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, SrcXprType=Eigen::Product<Eigen::Matrix<std::complex<float
>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 3>, Functor=Eigen::internal::assign_op<std::complex<float>>, Scalar=std::complex<f
loat>]"
/usr/local/eigen/Eigen/src/Core/AssignEvaluator.h(752): here
            instantiation of "void Eigen::internal::call_assignment_no_alias(Dst &, const Src &, const Func &) [with Dst=Eigen::Matrix<std::complex<float>, -1,
-1, 0, -1, -1>, Src=Eigen::Product<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 3>, Func=Eigen:
:internal::assign_op<std::complex<float>>]"
/usr/local/eigen/Eigen/src/Core/PlainObjectBase.h(666): here
            instantiation of "Derived &Eigen::PlainObjectBase<Derived>::_set_noalias(const Eigen::DenseBase<OtherDerived> &) [with Derived=Eigen::Matrix<std::co
mplex<float>, -1, -1, 0, -1, -1>, OtherDerived=Eigen::Product<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<float>, -1, -1,
0, -1, -1>, 3>]"
/usr/local/eigen/Eigen/src/Core/Matrix.h(328): here
            instantiation of "Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const Eigen::MatrixBase<OtherDerived> &) [with _Scalar=
std::complex<float>, _Rows=-1, _Cols=-1, _Options=0, _MaxRows=-1, _MaxCols=-1, OtherDerived=Eigen::Product<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>
, Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 3>]"
/usr/local/src/fingerprint/traxit_fingerprinting/***_******.cu(5): here

/usr/local/eigen/Eigen/src/Core/Redux.h(463): warning: calling a __host__ function from a __host__ __device__ function is not allowed
          detected during:
            instantiation of "Eigen::DenseBase<Derived>::Scalar Eigen::DenseBase<Derived>::sum() const [with Derived=Eigen::CwiseBinaryOp<Eigen::internal::scala
r_product_op<std::complex<float>, std::complex<float>>, const Eigen::Transpose<const Eigen::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 1
, -1, false>>, const Eigen::Block<const Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, -1, 1, true>>]"
/usr/local/eigen/Eigen/src/Core/ProductEvaluators.h(467): here
            instantiation of "const Eigen::internal::product_evaluator<Eigen::Product<Lhs, Rhs, 3>, ProductTag, Eigen::DenseShape, Eigen::DenseShape, Lhs::Scala
r, Rhs::Scalar>::CoeffReturnType Eigen::internal::product_evaluator<Eigen::Product<Lhs, Rhs, 3>, ProductTag, Eigen::DenseShape, Eigen::DenseShape, Lhs::Scalar,
Rhs::Scalar>::coeff(Eigen::internal::product_evaluator<Eigen::Product<Lhs, Rhs, 3>, ProductTag, Eigen::DenseShape, Eigen::DenseShape, Lhs::Scalar, Rhs::Scalar>:
:Index, Eigen::internal::product_evaluator<Eigen::Product<Lhs, Rhs, 3>, ProductTag, Eigen::DenseShape, Eigen::DenseShape, Lhs::Scalar, Rhs::Scalar>::Index) cons
t [with Lhs=Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, Rhs=Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, ProductTag=7]"
/usr/local/eigen/Eigen/src/Core/AssignEvaluator.h(564): here
            instantiation of "void Eigen::internal::generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>::assignCoeff(Eigen::
internal::generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>::Index, Eigen::internal::generic_dense_assignment_kernel<DstEv
aluatorTypeT, SrcEvaluatorTypeT, Functor, Version>::Index) [with DstEvaluatorTypeT=Eigen::internal::evaluator<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1,
-1>>, SrcEvaluatorTypeT=Eigen::internal::evaluator<Eigen::Product<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<float>, -1,
-1, 0, -1, -1>, 3>>, Functor=Eigen::internal::assign_op<std::complex<float>>, Version=0]"
/usr/local/eigen/Eigen/src/Core/AssignEvaluator.h(578): here
            instantiation of "void Eigen::internal::generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>::assignCoeffByOuterI
nner(Eigen::internal::generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>::Index, Eigen::internal::generic_dense_assignment_
kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>::Index) [with DstEvaluatorTypeT=Eigen::internal::evaluator<Eigen::Matrix<std::complex<float>, -1,
 -1, 0, -1, -1>>, SrcEvaluatorTypeT=Eigen::internal::evaluator<Eigen::Product<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<
float>, -1, -1, 0, -1, -1>, 3>>, Functor=Eigen::internal::assign_op<std::complex<float>>, Version=0]"
/usr/local/eigen/Eigen/src/Core/AssignEvaluator.h(290): here
            instantiation of "void Eigen::internal::dense_assignment_loop<Kernel, 0, 0>::run(Kernel &) [with Kernel=Eigen::internal::generic_dense_assignment_ke
rnel<Eigen::internal::evaluator<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>>, Eigen::internal::evaluator<Eigen::Product<Eigen::Matrix<std::complex<flo
at>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 3>>, Eigen::internal::assign_op<std::complex<float>>, 0>]"
/usr/local/eigen/Eigen/src/Core/AssignEvaluator.h(646): here
            instantiation of "void Eigen::internal::call_dense_assignment_loop(const DstXprType &, const SrcXprType &, const Functor &) [with DstXprType=Eigen::
Matrix<std::complex<float>, -1, -1, 0, -1, -1>, SrcXprType=Eigen::Product<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<floa
t>, -1, -1, 0, -1, -1>, 3>, Functor=Eigen::internal::assign_op<std::complex<float>>]"
/usr/local/eigen/Eigen/src/Core/AssignEvaluator.h(775): here
            instantiation of "void Eigen::internal::Assignment<DstXprType, SrcXprType, Functor, Eigen::internal::Dense2Dense, Scalar>::run(DstXprType &, const S
rcXprType &, const Functor &) [with DstXprType=Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, SrcXprType=Eigen::Product<Eigen::Matrix<std::complex<float
>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 3>, Functor=Eigen::internal::assign_op<std::complex<float>>, Scalar=std::complex<f
loat>]"
/usr/local/eigen/Eigen/src/Core/AssignEvaluator.h(752): here
            instantiation of "void Eigen::internal::call_assignment_no_alias(Dst &, const Src &, const Func &) [with Dst=Eigen::Matrix<std::complex<float>, -1,
-1, 0, -1, -1>, Src=Eigen::Product<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 3>, Func=Eigen:
:internal::assign_op<std::complex<float>>]"
/usr/local/eigen/Eigen/src/Core/PlainObjectBase.h(666): here
            instantiation of "Derived &Eigen::PlainObjectBase<Derived>::_set_noalias(const Eigen::DenseBase<OtherDerived> &) [with Derived=Eigen::Matrix<std::co
mplex<float>, -1, -1, 0, -1, -1>, OtherDerived=Eigen::Product<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, Eigen::Matrix<std::complex<float>, -1, -1,
0, -1, -1>, 3>]"
/usr/local/eigen/Eigen/src/Core/Matrix.h(328): here
            instantiation of "Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const Eigen::MatrixBase<OtherDerived> &) [with _Scalar=
std::complex<float>, _Rows=-1, _Cols=-1, _Options=0, _MaxRows=-1, _MaxCols=-1, OtherDerived=Eigen::Product<Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>
, Eigen::Matrix<std::complex<float>, -1, -1, 0, -1, -1>, 3>]"
/usr/local/src/fingerprint/traxit_fingerprinting/***_******.cu(5): here

/usr/local/eigen/Eigen/src/Core/DenseStorage.h(283): warning: calling a __host__ function("Eigen::internal::conditional_aligned_new_auto<std::complex<float> , (
bool)1> ") from a __host__ __device__ function("Eigen::PlainObjectBase<Eigen::Matrix<std::complex<float> , (int)-1, (int)-1, (int)0, (int)-1, (int)-1> > ::Plain
ObjectBase") is not allowed

/usr/local/eigen/Eigen/src/Core/DenseStorage.h(334): warning: calling a __host__ function("Eigen::internal::conditional_aligned_new_auto<std::complex<float> , (
bool)1> ") from a __host__ __device__ function("Eigen::internal::call_assignment_no_alias<Eigen::Matrix<std::complex<float> , (int)-1, (int)-1, (int)0, (int)-1,
 (int)-1> , Eigen::Product<Eigen::Matrix<std::complex<float> , (int)-1, (int)-1, (int)0, (int)-1, (int)-1> , Eigen::Matrix<std::complex<float> , (int)-1, (int)-
1, (int)0, (int)-1, (int)-1> , (int)3> , Eigen::internal::assign_op<std::complex<float> > > ") is not allowed
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
Complexes (aka std::complex) are not supported with CUDA simply because the STL is not compatible with CUDA.
flavianhautbois
Registered Member
Posts
7
Karma
0
OS
OK, thankfully we can emulate complex matrix multiplication with real matrices.

For potential readers:
Code: Select all
If you have complex matrices A and B, then C = A x B is equivalent to
Re(C) = Re(A) * Re(B) - Im(A) * Im(B)
Im(C) = Im(A) * Re(B) + Im(B) * Re(A)

where Re and Im are respectfully the real and imaginary part of the complex numbers inside the matrix.

You can also get the absolute value of C by computing sqrt(Re(C) ^ 2 + Im(C) ^ 2)


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]