Skip to content

dont use floating point values to index eigen types#1361

Merged
jdumas merged 5 commits intolibigl:masterfrom
Janos95:dev
Apr 11, 2020
Merged

dont use floating point values to index eigen types#1361
jdumas merged 5 commits intolibigl:masterfrom
Janos95:dev

Conversation

@Janos95
Copy link
Copy Markdown
Contributor

@Janos95 Janos95 commented Nov 25, 2019

As discussed in the corresponding issue, I changed the necessary files so there are no Eigen array accesses using floating point types.

Check all that apply (change to [x])

  • All changes meet libigl style-guidelines.
  • Adds new .cpp file.
  • Adds corresponding unit test.
  • Adds corresponding python binding.
  • This is a minor change.

for(int bxi = xi;signed_xi<--bxi;)
{
S(bxi+res(0)*(yi + res(1)*zi)) = s;
S(int(bxi+res(0)*(yi + res(1)*zi))) = s;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here the cast should be on res(0) and res(1) directly.

@jdumas
Copy link
Copy Markdown
Collaborator

jdumas commented Dec 14, 2019

@Janos95 can you rename cut_mesh_rosy.cpp back to cut_mesh.cpp?

@Janos95
Copy link
Copy Markdown
Contributor Author

Janos95 commented Dec 14, 2019

Sorry, I thought this was already merged so I pushed some other work onto my fork.

@jdumas
Copy link
Copy Markdown
Collaborator

jdumas commented Dec 14, 2019

Thanks! But I think my comment from last time still applies (about casting only the doubles, not the whole expr). I would have merged it earlier but our current CI is a bit wonky (it often times out and I need to restart it manually).

@Janos95
Copy link
Copy Markdown
Contributor Author

Janos95 commented Dec 14, 2019

I think I corrected that in 5b996d9 .

@jdumas
Copy link
Copy Markdown
Collaborator

jdumas commented Dec 14, 2019

5b996d9 only changed one line, but I think the comment applies to other lines as far as I can tell from the PR summary.

@teseoch teseoch changed the base branch from dev to master April 11, 2020 16:36
@jdumas jdumas merged commit 0f55740 into libigl:master Apr 11, 2020
skoch9 pushed a commit to skoch9/libigl that referenced this pull request Jun 3, 2020
* dont use floating point values to index eigen types

* only cast doubles not the whole expression

* add remaining casts

* Update cast.

Co-authored-by: Jérémie Dumas <jeremie.dumas@ens-lyon.org>
jmather-sesi added a commit to sideeffects/libigl that referenced this pull request Jun 10, 2022
This resolves an issue in active_set.cpp for newer Eigen versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants