Skip to content
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

std::byte support #87

Open
someonewithpc opened this issue Aug 14, 2024 · 3 comments
Open

std::byte support #87

someonewithpc opened this issue Aug 14, 2024 · 3 comments

Comments

@someonewithpc
Copy link

I'm not sure if this is the appropriate venue for this discussion, or if it should go in the mailing list, so please advise @jaredhoberock

9.1.4 specifies that the vectorizable types must be arithmethic types. std::byte is not an arithmethic type, but allowing support for std::simd<std::byte> with only the same operators defined for std::byte, i.e. the binary
element-wise operations
would allow better encoding the semantic meaning of, for instance, bytes read from disk before being validated as valid ASCII or UTF-8, as opposed to using std::simd<char>

@mattkretz
Copy link

Thank you for your feedback. I'm actually collecting TS feedback at https://github.com/mattkretz/std-simd-feedback/issues (there was a WG21 paper on it in 2019).

Wrt. std::byte: we're working on simd<enum> to work in general. The committee throughput is limited though, which is why I expect that feature to not make C++26. :(

@someonewithpc
Copy link
Author

Thanks for the response :) Should I post this issue there, or are you able to move it, or would it be redundant with the simd<enum> issue you mentioned? I'd like to help, somehow, but I have never been involved in the standards process, and I don't have too much experience with SIMD in general, yet

I'm a little sad to hear it might not make C++26, but I think it's important to design this so it will work well into the future, which is hard, so I'm not surprised, and I really appreciate the effort. I've been using GCC's implementation, and it's great to work with already, so great work!

@mattkretz
Copy link

Thank you for the positive feedback (since I wrote GCC's implementation 😉 - and the spec). No need for you to open another issue. There are prominent members inside WG21 asking for it. But yeah, we like to provide generic solutions rather than narrow features, even if it takes longer.

There's no simple way to make the committee work more (it's already pretty crazy), it takes time. If you're interested in helping with the C++26 implementation (and exploration for additional features) for GCC take a look at mattkretz/simd-prototyping. For now that's my playground for C++26 std::simd. https://wg21.link/P1928 is the latest spec proposal, but there are many more papers in the queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants