-
Notifications
You must be signed in to change notification settings - Fork 20
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 NVTX macros with constexpr + namespaced methods #990
Conversation
Ranges can be generated from python now:
Might need some tweaking if / when we have a static installable build of the c++ library, as the ENABLED property is just fed from the macro. Not checked this produces the same binaries, that's a much bigger effort to diff than a standalone incomplete MWE. |
194f4de
to
8ae6bd9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest to disable Range
in Python to avoid potential Python garbage collection problems.
8ae6bd9
to
646bcee
Compare
Now re-adjusted to:
Needs a squash, but subject to windows specific warnings about unused variables / masking this should be good to re-review. |
3d7adce
to
b19fd03
Compare
+ Replaces NVTX_PUSH(label) with flamegpu::util::nvtx::push(label) + Replaces NVTX_POP() with flamegpu::util::nvtx::pop() + Replaces NVTX_RANGE(label) with flamegpu::util::nvtx::Range(label) + Ranges must be assigned to a variable for correct lifetime + Add constexpr bool flamegpu::util::nvtx::ENABLED + Wraps flamegpu::util::nvtx with swig, excluding ranges due to Swig + python GC concerns + Adds pyflamegpu.nvtx_push(lable) + Adds pyflamegpu.nvtx_pop() + Adds pyflamegpu.NVTX_ENABLED + Adds python tests
b19fd03
to
7e8d992
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, will merge after CI is happy.
Should have the same (C++) runtime cost in optimisaed builds
Closes #984