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

Missing reverseInnerIterator in Eigen 3.3 ?

Tags: None
(comma "," separated)
twithaar
Registered Member
Posts
23
Karma
0
While trying out Eigen 3.3 (ubuntu 16.04) I ran into:

/usr/include/eigen3/Eigen/src/SparseCore/SparseTranspose.h:59:63: error: no type named ‘ReverseInnerIterator’ in ‘struct Eigen::internal::evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<unsigned char, float>, const Eigen::Block<Eigen::Map<Eigen::SparseMatrix<unsigned char, 1, int>, 0, Eigen::Stride<0, 0> >, 1, -1, true> > >’


With the code below.
Admittedly, the code isn't exactly a beaty.
So I'm wondering, did I just shoot myself in the foot, or is this actually supposed to work ?

Code: Select all
template<typename Vector>
void SolveNonLinear(Vector& b)
{
   b.squaredNorm();
   // more code snipped
}

void demo(int row)
{
Eigen::MappedSparseMatrix<Tdata, Eigen::RowMajor, Spectrum::DynamicSparseMatrix::Index> X(slice.rows, slice.cols, slice.nnz, slice.pOuterIdx, slice.pInnerIdx, slice.pValue);
auto bSparse = X.row(row).template cast<float>();
auto pTrans = bSparse.transpose();
SolveNonLinear(pTrans);
}


If I remove the transpose(), it compiles and links.
With the transpose() the code compiles and works fine with eigen 3.2.4
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
good catch, the issue is triggered only with the combinaison of both cast and transpose.... I'll fix it asap.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
in the meantime, you can workaround by swapping the cast and transpose:

X.row(i).transpose().cast<float>().squaredNorm()
twithaar
Registered Member
Posts
23
Karma
0
ggael wrote:in the meantime, you can workaround by swapping the cast and transpose:

X.row(i).transpose().cast<float>().squaredNorm()


Thanks!
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
For the record, this precise issue has been fixed prior to the 3.3 release.


Bookmarks



Who is online

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