Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • eigen eigen
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 696
    • Issues 696
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Custom issue tracker
    • Custom issue tracker
  • Merge requests 26
    • Merge requests 26
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • libeigenlibeigen
  • eigeneigen
  • Issues
  • #1224
Closed
Open
Issue created Dec 04, 2019 by Eigen Bugzilla@eigenbzReporter

.sparseView fails on matrix products

Submitted by Rasmus Munk Larsen @rmlarsen1

Assigned to Nobody

Link to original bugzilla bug (#1224)
Version: 3.3 (current stable)

Description

The following expression used to compile with 3.2, but fails to compile with the dev branch (I am synced at commit ba95e43e):

rotation_matrix_ = (encoder_matrix_ * decoder_matrix_).sparseView(kReference, kEpsilon);

encoded and decoder matrices are fixed-size dense matrices. I get the following error message:

In file included from XXX.cc:1:
In file included from YYY.h:7:
In file included from ZZZ/Eigen/SparseCore:42:
ZZZ/Eigen/src/SparseCore/SparseMatrix.h:1075:36: error: no type named 'InnerIterator' in 'Eigen::internal::evaluator<Eigen::SparseView<Eigen::Product<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::Matrix<float, -1, -1, 0, -1, -1>, 0> > >'
for (typename OtherCopyEval::InnerIterator it(otherCopyEval, j); it; ++it)
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
XXX.cc:53:20: note: in instantiation of function template specialization 'Eigen::SparseMatrix<float, 0, int>::operator=<Eigen::SparseView<Eigen::Product<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::Matrix<float, -1, -1, 0, -1, -1>, 0> > >' requested here
rotation_matrix_ = (encoder_matrix_ * decoder_matrix_).sparseView(kReference, kEpsilon);
^
In file included from XXX.cc:1:
In file included from YYY.h:7:
In file included from ZZZ/Eigen/SparseCore:42:
ZZZ/Eigen/src/SparseCore/SparseMatrix.h:1094:36: error: no type named 'InnerIterator' in 'Eigen::internal::evaluator<Eigen::SparseView<Eigen::Product<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::Matrix<float, -1, -1, 0, -1, -1>, 0> > >'
for (typename OtherCopyEval::InnerIterator it(otherCopyEval, j); it; ++it)
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from XXX.cc:1:
In file included from YYY.h:7:
In file included from ZZZ/Eigen/SparseCore:57:
ZZZ/Eigen/src/SparseCore/SparseProduct.h:145:12: error: static_cast from 'Eigen::internal::evaluator<Eigen::SparseView<Eigen::Product<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::Matrix<float, -1, -1, 0, -1, -1>, 0> > > *' to 'Base *' (aka 'evaluator<SparseMatrix<float, Flags & RowMajorBit ? RowMajor : ColMajor, long> > '), which are not related by inheritance, is not allowed
::new (static_cast<Base
>(this)) Base(m_result);
^~~~~~~~~~~~~~~~~~~~~~~~
ZZZ/Eigen/src/SparseCore/SparseMatrix.h:1067:19: note: in instantiation of member function 'Eigen::internal::evaluator<Eigen::SparseView<Eigen::Product<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::Matrix<float, -1, -1, 0, -1, -1>, 0> > >::evaluator' requested here
OtherCopyEval otherCopyEval(otherCopy);
^
XXX.cc:53:20: note: in instantiation of function template specialization 'Eigen::SparseMatrix<float, 0, int>::operator=<Eigen::SparseView<Eigen::Product<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::Matrix<float, -1, -1, 0, -1, -1>, 0> > >' requested here
rotation_matrix_ = (encoder_matrix_ * decoder_matrix_).sparseView(kReference, kEpsilon);
^

Blocking

#558 (closed)

Edited Dec 05, 2019 by Eigen Bugzilla
Assignee
Assign to
Time tracking