Compilation failure due to missing assign_impl when building with MKL
Submitted by Kevin locke
Assigned to Nobody
Link to original bugzilla bug (#923)
Version: 3.3 (current stable)
Description
When using the current development version of Eigen from the default branch on Bitbucket (f5f6e2c6), compiling the following program:
#define EIGEN_USE_MKL_ALL
#include <Eigen/Core>
int main(void)
{
return 0;
}
With g++ -I$EIGEN -I$MKLROOT/include -c eigenbug.cpp
results in several errors, the first of which are:
eigen/Eigen/src/Core/Assign_MKL.h:79:16: error: expected template-name before ‘<’ token
: assign_impl<Derived1, Eigen::CwiseUnaryOp<UnaryOp, Derived2>,Traversal,Unrolling,BuiltIn>
^
eigen/Eigen/src/Core/Assign_MKL.h:79:16: error: expected ‘{’ before ‘<’ token
eigen/Eigen/src/Core/Assign_MKL.h:79:16: error: expected unqualified-id before ‘<’ token
eigen/Eigen/src/Core/Assign_MKL.h:118:10: error: ‘assign_impl’ is not a class template
struct assign_impl<Derived1, Eigen::CwiseUnaryOp<UnaryOp, Derived2>, TRAVERSAL, UNROLLING, Specialized> { \
^
eigen/Eigen/src/Core/Assign_MKL.h:124:1: note: in expansion of macro ‘EIGEN_MKL_VML_SPECIALIZE_ASSIGN’
EIGEN_MKL_VML_SPECIALIZE_ASSIGN(DefaultTraversal,NoUnrolling)
^
eigen/Eigen/src/Core/Assign_MKL.h:118:105: error: wrong number of template arguments (5, should be 3)
struct assign_impl<Derived1, Eigen::CwiseUnaryOp<UnaryOp, Derived2>, TRAVERSAL, UNROLLING, Specialized> { \
^
eigen/Eigen/src/Core/Assign_MKL.h:125:1: note: in expansion of macro ‘EIGEN_MKL_VML_SPECIALIZE_ASSIGN’
EIGEN_MKL_VML_SPECIALIZE_ASSIGN(DefaultTraversal,CompleteUnrolling)
The issue first appeared in changeset c1d0f15b, although that change obviously exposed the issue rather than introducing it. From the other instances of assign_impl being removed in changeset 0ca43f7e, it appears that this may be mostly (all?) dead code. Removing the content from Assign_MKL.h appears to fix compilation, but I am unsure if it introduces a performance issue by removing the calls to MKL and if these calls may need to be moved elsewhere.
Any advice about either short and long term fixes would be appreciated.
Thanks,
Kevin