cygwin에서 mingw 컴파일러로 Eigen을 성공적으로 컴파일 할 수있었습니다.리눅스의 intel 컴파일러에서의 고유 라이브러리 컴파일 오류
Intel C++ 컴파일러로 Linux에서 컴파일 할 때 다음 오류가 발생합니다.
저는 Eigen 라이브러리를 사용하여 AX = B를 풀고 있습니다.
나는 Eigen3.3-rc1을 사용하고 있습니다.
어떻게 해결할 수 있을까요?
감사합니다.
./Eigen/src/Core/CoreEvaluators.h(491) 오류 : 적절한 연산자(), 또는 함수 포인터 타이핑 복귀 m_wrapper 변환 기능이없는 클래스 타입의 객체 호출 (m_functor, index); "Eigen :: CwiseNullaryOp :: CoeffReturnType Eigen :: internal :: evaluator :: coeff (IndexType) const"의 인스턴스 생성 중 NullaryOp = Eigen :: internal :: scalar_constant_op, PlainObjectType = Eigen :: Matrix, IndexType = long] "./Eigen/src/Core/AssignEvaluator.h"의 637 줄에서 . . . 오류가 계속 발생합니다.
편집 : 큰 오류 메시지는 다음과 같습니다.
./Eigen/src/Core/CoreEvaluators.h(491): error: call of an object of a class type without appropriate operator() or conversion functions to pointer-to-function type
return m_wrapper(m_functor,index);
^
detected during:
instantiation of "Eigen::CwiseNullaryOp<NullaryOp, PlainObjectType>::CoeffReturnType Eigen::internal::evaluator<Eigen::CwiseNullaryOp<NullaryOp, PlainObjectType>>::coeff(IndexType) const [with NullaryOp=Eigen::internal::scalar_constant_op<double>, PlainObjectType=Eigen::Matrix<double, -1, 1, 0, -1, 1>, IndexType=long]" at line 637 of "./Eigen/src/Core/AssignEvaluator.h"
instantiation of "void Eigen::internal::generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>::assignCoeff(Eigen::Index={ptrdiff_t={long}}) [with DstEvaluatorTypeT=Eigen::internal::evaluator<Eigen::Block<Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0>>, -1, -1, false>, -1, 1, true>, -1, 1, false>>,
SrcEvaluatorTypeT=Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, 1, 0, -1, 1>>>, Functor=Eigen::internal::div_assign_op<double, double>, Version=0]" at line 390 of "./Eigen/src/Core/AssignEvaluator.h"
instantiation of "void Eigen::internal::unaligned_dense_assignment_loop<false>::run(Kernel &, Eigen::Index={ptrdiff_t={long}}, Eigen::Index={ptrdiff_t={long}}) [with Kernel=Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Block<Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0>>, -1, -1, false>, -1, 1, true>, -1, 1, false>>,
Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, 1, 0, -1, 1>>>, Eigen::internal::div_assign_op<double, double>, 0>]" at line 413 of "./Eigen/src/Core/AssignEvaluator.h"
instantiation of "void Eigen::internal::dense_assignment_loop<Kernel, 3, 0>::run(Kernel &) [with Kernel=Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Block<Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0>>, -1, -1, false>, -1, 1, true>, -1, 1, false>>, Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, 1, 0, -1, 1>>>,
Eigen::internal::div_assign_op<double, double>, 0>]" at line 713 of "./Eigen/src/Core/AssignEvaluator.h"
instantiation of "void Eigen::internal::call_dense_assignment_loop(const DstXprType &, const SrcXprType &, const Functor &) [with DstXprType=Eigen::Block<Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 0, Eigen::Stride<0, 0>>, -1, -1, false>, -1, 1, true>, -1, 1, false>, SrcXprType=Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, 1, 0, -1, 1>>, Functor=Eigen::internal::div_assign_op<double, double>]" at line
862 of "./Eigen/src/Core/AssignEvaluator.h"
[ 6 instantiation contexts not shown ]
instantiation of "void Eigen::internal::partial_lu_inplace(MatrixType &, TranspositionType &, TranspositionType::StorageIndex &) [with MatrixType=Eigen::Matrix<double, -1, -1, 0, -1, -1>, TranspositionType=Eigen::Transpositions<-1, -1, int>]" at line 530 of "./Eigen/src/LU/PartialPivLU.h"
instantiation of "void Eigen::PartialPivLU<_MatrixType>::compute() [with _MatrixType=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 131 of "./Eigen/src/LU/PartialPivLU.h"
instantiation of "Eigen::PartialPivLU<_MatrixType> &Eigen::PartialPivLU<_MatrixType>::compute(const Eigen::EigenBase<OtherDerived> &) [with _MatrixType=Eigen::Matrix<double, -1, -1, 0, -1, -1>, InputType=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 323 of "./Eigen/src/LU/PartialPivLU.h"
instantiation of "Eigen::PartialPivLU<_MatrixType>::PartialPivLU(const Eigen::EigenBase<OtherDerived> &) [with _MatrixType=Eigen::Matrix<double, -1, -1, 0, -1, -1>, InputType=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 606 of "./Eigen/src/LU/PartialPivLU.h"
instantiation of "const Eigen::PartialPivLU<Eigen::DenseBase<Derived>::PlainObject> Eigen::MatrixBase<Derived>::lu() const [with Derived=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" at line 245 of "Matrix.cpp"
여기 아이겐
#include <Eigen/Eigen>
using Eigen::MatrixXd;
using Eigen::VectorXd;
int solveAXBEigen(double *a, double *b, double *x, int n) {
MatrixXd A(n, n);
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
A(i, j) = a[n * i + j];
}
}
VectorXd B(n);
for (int i = 0; i < n; i++) {
B(i) = b[i];
}
VectorXd X = A.lu().solve(B);
for (int i = 0; i < n; i++) {
x[i] = X(i);
}
return 0;
}
모든 단위 테스트는 ICC로 잘 컴파일되므로이 문제를 유발하는 코드 줄을 보여주십시오. – ggael
관련 코드 및 큰 오류 메시지 흔적을 포함하도록 편집 한 질문. –
여기에 ICC 16.0.2 및 Eigen 3.3-rc1을 사용하여 예제가 잘 컴파일됩니다. – ggael