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

call_support: allow override of the Domain #307

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

merlinND
Copy link
Member

@merlinND merlinND commented Oct 25, 2024

This PR lets users of DRJIT_CALL_* macros specify a domain_ static constexpr method to override the domain name, e.g. based on some of the template parameters.

This is used in this Mitsuba PR: mitsuba-renderer/mitsuba3#1362
If we find an easier way to fix the Mitsuba issue, then this change would no longer be needed.

@njroussel
Copy link
Member

This seems fine, an alternative would be to overload the DRJIT_CALL_BEGIN macro to take two arguments: the class name and the domain name.

Let's avoid the double leading underscore in __domain() - it's usually reserved for the compiler :)

@merlinND
Copy link
Member Author

overload the DRJIT_CALL_BEGIN macro to take two arguments: the class name and the domain name.

I thought about that, but since the domain name needs to be computed based on template arguments that are only provided once the call_support struct is instantiated, I don't think we could give the domain name as a macro argument.

@njroussel
Copy link
Member

Oh yes, indeed :/

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