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
VectorizedArray<float,2> does not exist. #16827
Comments
On x86 the smallest vectorization instructions available are SSE which use 128bit registers, thus, 4 floats (or 2 doubles). We could create such a truncated data type (i.e. only use 2 out of 4 packed floats), but on the other hand, we chose a one-to-one mapping between On a related note, @kronbichler discussed some plans of making the larger |
Ah, bummer. I'll disable vectorization for the |
@bangerth What about we close this as not planned? |
Yes, that's reasonable. I wished there was a way to test whether a specific specialization exists, rather than just asking what the largest one is, but I can work with the current state. |
@bangerth Would it help to manually specify all available variants in I mean we are already defining all overloads there, so we could also add specializations to a type trait
That way you can simply |
Yes, something like that would work. As I said, I need it in one place. It's perhaps not worth inventing heavy machinery just for that case. We can consider this if we ever need it again. |
The way I understand
VectorizedArrayWidthSpecifier<T>::max_width
to work is that if, for example, for a typeT
there is a 4-element vector type but nothing larger, thenmax_width
is set to 4 and that that implies that for every smaller power of two, a vectorized type exists. This is true forVectorizedArrayWidthSpecifier<double>
as far as I can see: For some instruction sets, it is set to 4 but there are also vectorized arrays with width 2.Not so for
float
:VectorizedArray<float,2>
does not exist, regardless of instruction set. The problem is that only being able to query the max width leaves no way to figure out whether for width 2 a vectorized type actually exists.How do we address this? Is it an oversight that that class was never implemented? Or do vector intrinsics just not exist for this case?
In reference to #16465 .
The text was updated successfully, but these errors were encountered: