Closed merlinND closed 3 weeks ago
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 :)
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.
Oh yes, indeed :/
This PR lets users of
DRJIT_CALL_*
macros specify adomain_
static constexpr method to override the domain name, e.g. based on some of the template parameters.This is used in this Mitsuba PR: https://github.com/mitsuba-renderer/mitsuba3/pull/1362 If we find an easier way to fix the Mitsuba issue, then this change would no longer be needed.