-
Notifications
You must be signed in to change notification settings - Fork 407
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
Fix alignment for Kokkos::complex #2255
Comments
Needs to fix both |
Don't you mean |
And that won't work for pair, as it takes two different types |
I actually think we don't even want to go there with |
@nliber jinx |
We can partially specialize for |
I don't know if we really want to support use cases that abuse template <class T, class U>
struct alignas((alignof(T) > alignof(U)) ? 2 * alignof(T) : 2 * alignof(U)) pair; That should do the trick, and should support whatever use cases we would have wanted to support for the |
There look to be a fair number of uses of pair<T, T> inside Kokkos, so we probably should do this (the full general one @dhollman wrote above). |
I am fine with that. |
Related PR #2259 |
Reported at hackathon, in order to get proper 8 byte and 16 byte loads for
complex<float>
andcomplex<double>
the user derived his own classes from CUDA'sfloat2
anddouble2
.But it is enough to tell the type that it is aligned:
alignas ( 2*sizeof(RealType))
The text was updated successfully, but these errors were encountered: