Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Eigen pointers with iterators #105

Open
TolisChal opened this issue Jul 30, 2020 · 14 comments
Open

Replace Eigen pointers with iterators #105

TolisChal opened this issue Jul 30, 2020 · 14 comments

Comments

@TolisChal
Copy link
Member

Replace eigen pointers in hpolytope.hpp and in the implementations of largest inscribed ball and elipsoid methods.

@shub-garg
Copy link

Hello if nobody is working on it, I would like to contribute to this issue! I am new to open source and trying to work my way to GSOC.

@vissarion
Copy link
Member

@shub-garg nobody is working on it, please feel free to give it a try

@shub-garg
Copy link

Can you please guide me a little as to what exactly I need to do in this? As I said, I am new to all this, trying to learn.

@vissarion
Copy link
Member

vissarion commented Aug 24, 2020

the issues of the library is probably not the best place for this, please join our chat on gitter https://gitter.im/GeomScale/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link, also have a look at this tutorial https://github.com/GeomScale/volume_approximation/blob/develop/CONTRIBUTING.md

@vissarion vissarion changed the title replace eigen pointers with iterators Replace Eigen pointers with iterators Sep 8, 2020
@vissarion vissarion added the PyDataGlobal PyData Global 2020 Sprint label Nov 6, 2020
@vaithak
Copy link
Collaborator

vaithak commented Jan 28, 2021

Hi, I am just curious why do you want to replace the pointers? I am asking because firstly, Eigen doesn't provide begin() or end() methods for its matrix and vector class, also I read this answer: https://stackoverflow.com/a/16287999, which benchmarks different ways of traversing EIgen matrix and the one using pointer and .data() method is the fastest.

Please correct me if I am wrong or if I misunderstood something.

@vissarion
Copy link
Member

@vaithak thanks for your search. Iterators are safer and less error-prone than pointers.

First, eigen supports STL compatible iterators https://eigen.tuxfamily.org/dox-devel/group__TutorialSTL.html since 3.4.

Second, it is not clear to me whether pointers are faster than iterators since the benchmarks in https://stackoverflow.com/a/16287999 are >6 years old and does not contain important information about reproducibility (e.g. compiler, platform). But if you are interested to provide your own benchmarks here we would be happy to discuss them.

@vaithak
Copy link
Collaborator

vaithak commented Feb 1, 2021

Thanks @vissarion for your response. Does the repository contains the updated version (3.4) of Eigen in external folder ? I don't think so, as the commit history shows that Eigen folder was updated 2 years ago, so should I update it ?
If yes, then I think I should also give #114 a try, as it requires removing manual updating of external libraries.

@vissarion
Copy link
Member

Yes, I think it makes more sense to go directly to #114 (or part of it) by removing eigen from external and add some cmake commands that allow the user to download and/or use the system installed eigen.

@vaithak
Copy link
Collaborator

vaithak commented Mar 1, 2021

@vissarion @TolisChal , I think we should wait for a stable release of Eigen 3.4 for this. I tried using the 3.4.0-rc1 to get the features of iterators in Eigen, but some of the test cases are failing even without any new code changes.

@vissarion vissarion added Hacktoberfest and removed PyDataGlobal PyData Global 2020 Sprint labels Oct 11, 2021
@himanshuParashar0101
Copy link

we can replace the data flow of eagens

@vaithak
Copy link
Collaborator

vaithak commented Feb 28, 2022

@himanshuParashar0101 yup, this issue can be worked on now as we have upgraded eigen's version to 3.4.0 in #186.

@bsarthak16
Copy link

hi can anybody explain me what exactly needs to be done in this problem as i am interested in solving it

@vgnecula
Copy link
Contributor

Hi! Is anybody working on this right now?

@vfisikop
Copy link
Contributor

No, as far as I know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants