-
Notifications
You must be signed in to change notification settings - Fork 794
[ESIMD] Allow full autodeduction for acc gather and slm_gather APIs accepting simd_view #13956
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
Conversation
| /// This function is identical to (lacc-ga-1) except that the \p byte_offsets | ||
| /// is represented as \c simd_view. | ||
| template < | ||
| int VS, typename T, int N, typename AccessorT, typename OffsetSimdViewT, |
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.
We don't need to compute N here?
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.
In this case no, since it has pass_thru parameter of simd<T,N> type and can deduct N from there
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.
I think in such cases it is useful to have a static_assert verifying that N from pass_thru and N from simd_view object are identical.
It would be much friendlier than seeing a long list consisting of 1 error + long list of notes explaining why the call could not be resolved.
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.
Added static_asserts where possible
| /// simd<T, N> gather(AccessorT acc, OffsetSimdViewT byte_offsets, | ||
| /// simd_mask<N / VS> mask, PassThruSimdViewT pass_thru, | ||
| /// PropertyListT props = {}); | ||
| /// This function is identical to (lacc-ga-1) except that the \p byte_offsets |
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.
It looks like this comment isn't accurate for a few of the overloads
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.
Fixed some comments
| simd<T, N>> | ||
| gather(AccessorT acc, OffsetSimdViewT byte_offsets, simd_mask<N / VS> mask, | ||
| simd<T, N> pass_thru, PropertyListT props = {}) { | ||
| static_assert(N / VS == |
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.
We might want to make an internal tracker to add these asserts to the APIs we already changed
No description provided.