Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • eigen eigen
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 653
    • Issues 653
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Custom issue tracker
    • Custom issue tracker
  • Merge requests 17
    • Merge requests 17
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • 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
  • libeigen
  • eigeneigen
  • Issues
  • #1741
Closed
Open
Created Dec 04, 2019 by Eigen Bugzilla@eigenbzReporter

Map<>.noalias()=A*B gives wrong result

Submitted by Patrick Peltzer

Assigned to Nobody

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

Description

Created attachment 949
Minimal code example to reproduce the issue

In an alias free multiplication with a Map<> type to assign to, using noalias() can lead to wrong results. Example:

C_Map = A * B; // Correct
C.setZero();
C_Map.noalias() = A*B; // Incorrect

See the attached code example on how to reproduce. I've noticed this for larger matrices (C_Map >= 8x8), where only half of the rows are modified and the other half stays untouched. Typical output for the minimal code example:

C_Map
8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8

C_Map.noalias()
8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8
8 8 8 8 8 8 8 8
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0

I've reproduced the issue on version 3.3.7 and the current 3.3 and the default branch.

Attachment 949, "Minimal code example to reproduce the issue":
map_noalias.cpp

Blocking

#814 (closed)

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