-
Notifications
You must be signed in to change notification settings - Fork 95
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
ENOKI_STRUCT_DYNAMIC
with mask
member
#14
Comments
Is this still an issue? |
It looks like |
I think the issue is that you just cannot slice a vectorized data structure with K-style register masks on KNL. I don't think there is a clear way to fix it, since we cannot create references to individual bits. The only workaround that comes to mind is to not use masks but less efficient bool arrays for storage. |
I'll close this issue as slicing K mask registers is now allowed in the C++17 version (you will get a wrapper type that knows how to update the original bit values). |
Slicing a dynamically-sized mask (
mask_t<FloatX>
) returns afloat &
(see Example 1). This makes sense given that masks are stored using their underlying type's registers andslice
needs to return a reference.But then, in the slicing operator defined by
ENOKI_STRUCT_DYNAMIC
,the following becomes problematic:
Would there be a way to initialize the mask with a reference to the underlying storage directly?
This problem occurs in Mitsuba 2, see Example 2.
Example 1
Result:
Example 2
Usage in Mitsuba 2 that triggers this issue:
The text was updated successfully, but these errors were encountered: