-
Notifications
You must be signed in to change notification settings - Fork 88
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
Error: array has sizeless element type 'vint16m1_t' (aka '__rvv_int16m1_t') #238
Comments
The C standard states that
With
Which incomplete types are defined as,
The RVV types are size-less types and currently the compiler operates respects the language standard. On the other hand, we do successfully have tuple types in the compiler, which is equivalent to declaring an array of RVV types with a known constant length. So I think this should be something we need to work through in the compiler, allowing a constant size array of RVV types to be declared. This is currently left out in the specification, as we do not support this feature yet. This is indeed an item we can look into. Thank you for raising this. |
Just dump few note from my brain: It's not only implementation issue, but also a language spec issue, we need very carefully to review all array related part in the C/C++ spec when we decide to support array with scalable vector type. |
I have the same problem with structs. If I want to wrap a vector type to add some static functions or consts, or even just to unique-ify a type for overloading, that's a no-go. I also tried a std::tuple<> wrapper, but no luck there either. |
Some previous discussion of structs is at #110; but basically it breaks many things about structs ( (perhaps it might be easier for compilers to support structs that contain only a single member of an RVV type, and behave largely as that member and not as a struct (other than methods/overloading), though that's a separate discussion and would likely still be problematic or at least weird) |
On the original question here about array variables - even if And with the messiness of having to manually do pointer arithmetic with Defining indexing of a pointer to an RVV vector could make sense, but that's a pretty different discussion. |
I want to define multiple variables of size vint16m1_t. so I use below :
vint16m1_t H_img[4][4], Wcal_real[4][4], Wcal_img[4][4];
But it has below error:
error: array has sizeless element type 'vint16m1_t' (aka '__rvv_int16m1_t')
vint16m1_t H_img[4][4], Wcal_real[4][4], Wcal_img[4][4];
How should I define the variables?
The text was updated successfully, but these errors were encountered: