db-tu-dresden / TSL

Template SIMD Library (+Generator)
GNU General Public License v3.0
6 stars 9 forks source link

Shift do not supported for `uint8_t` #99

Closed lawben closed 2 weeks ago

lawben commented 1 month ago

It looks like there is currently no support for shifts of uint8_t in AVX512 vectors.

lawben commented 1 month ago

Also applies to 16 byte SSE vectors.

error: no member named 'apply' in 'tsl::functors::shift_right<tsl::simd<unsigned char, tsl::sse, 16>, true, tsl::workaround>'

and

error: no type named 'param_tuple_t' in 'tsl::functors::shift_right<tsl::simd<unsigned char, tsl::sse, 16>, true, tsl::workaround>'
lawben commented 1 month ago

Sorry for the edit spam. I messed up something and then suddenly a lot of things did not work anymore... My bad. It looks like only the uint8_t shifts are an issue, but also for SSE and AVX2, not just AVX512.

JPietrzykTUD commented 2 weeks ago

Added support for right and left shifts for 8 and 16-bit integers for Intel with #103 Unfortunately, I didn't find a clever way to realize an 8 / 16-bit arithmetic right shift for SSE (without AVX instructions) that operates on two vectors.