bytemuck icon indicating copy to clipboard operation
bytemuck copied to clipboard

Support for experimental SIMD types?

Open orlp opened this issue 2 years ago • 3 comments

Could the types__m128bh, __m256bh, __m512, __m512bh, __m512d, __m512i be added to bytemuck under an experimental feature flag (or multiple, one for AVX-512 and one for the bh types)?

orlp avatar Jul 28 '22 22:07 orlp

I suppose. I'm not familiar with those but if they're basically normalish simd types that sounds fine.

Lokathor avatar Jul 28 '22 22:07 Lokathor

I'd also request the portable_simd types when compiling under nightly: impl Pod for std::simd::Simd<T, LANES> where T: Pod. Something for std::simd::Mask too, but the requirements there are more subtle, and I'm not yet confident of what they should be.

reinerp avatar Aug 17 '22 05:08 reinerp

I can agree with Simd<T> where T: Pod, but Mask is kinda dodgy, yeah.

Let's add each of these under a bytemuck cargo flag named after the rustc feature that lets you use them. So, portable_simd, and then whatever the avx-512 stuff is called.

Someone who isn't me do the PR, then I'll approve the PR and do a patch release of the provisional support.

Lokathor avatar Aug 17 '22 05:08 Lokathor