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

Avoid the calling of copy constructor/assignment #1524

Merged
merged 4 commits into from May 18, 2022
Merged

Conversation

whuaegeanse
Copy link
Contributor

Features in this PR:

  • Support move constructor when calling Push of JobQueue.
  • Avoid copy constructor when calling Pop of JobQueue.

Using the above features, we can avoid calling the copy constructor/assignment in tasks such as feature extraction/machining or meshing.

Copy link
Contributor

@ahojnnes ahojnnes left a comment

Choose a reason for hiding this comment

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

Thanks, this is a great improvement. Some detailed comments.

src/util/threading.h Outdated Show resolved Hide resolved
src/util/threading.h Outdated Show resolved Hide resolved
src/util/threading.h Show resolved Hide resolved
src/mvs/meshing.cc Show resolved Hide resolved
src/feature/matching.cc Outdated Show resolved Hide resolved
src/feature/matching.cc Outdated Show resolved Hide resolved
@ahojnnes ahojnnes merged commit 5695733 into colmap:dev May 18, 2022
@whuaegeanse whuaegeanse deleted the move branch May 18, 2022 17:03
lucasthahn pushed a commit to TNE-ai/colmap that referenced this pull request Aug 17, 2022
* Avoid the calling of copy constructor/assignment

* Simplify functions and drop &&

* Recover function Size() of JobQueue
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.

None yet

2 participants