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

BVH improvements #1429

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

BVH improvements #1429

wants to merge 6 commits into from

Conversation

adayton1
Copy link
Member

@adayton1 adayton1 commented Sep 27, 2024

Summary

  • This PR is a feature
  • It does the following:
    • Adds a constructor to BVH at the request of myself (see below)
    • Avoids unnecessary copy of each bounding box

Current pattern

axom::spin::BVH<3> bvh;
bvh.setAllocatorID(allocatorID);
bvh.initialize(boxes, numBoxes);

New pattern

axom::spin::BVH<3> bvh(boxes, numBoxes, allocatorID);

@adayton1
Copy link
Member Author

adayton1 commented Sep 27, 2024

My only concern is that initialize returns a bool indicating whether construction succeeds. But it looks like it always returns true, so it's probably not worth worrying about.

@white238
Copy link
Member

white238 commented Sep 27, 2024

"Avoids unnecessary copy of each bounding box"

@adayton1 have you ever thought that maybe we want to do extra work?!?! Why do you have to make everything so efficient and better?

src/axom/spin/BVH.hpp Outdated Show resolved Hide resolved
Copy link
Member

@rhornung67 rhornung67 left a comment

Choose a reason for hiding this comment

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

One minor comment nit and CI check compilation issues to be fixed.

Copy link
Member

@kennyweiss kennyweiss left a comment

Choose a reason for hiding this comment

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

Thanks @adayton1 !

src/axom/spin/BVH.hpp Outdated Show resolved Hide resolved
src/axom/spin/BVH.hpp Outdated Show resolved Hide resolved
@adayton1
Copy link
Member Author

/style

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.

6 participants