genericsimd / generic_simd

Generic SIMD intrinsic to allow for portable SIMD intrinsic programming
Other
42 stars 7 forks source link

Refactoring library using more generic programming #7

Open pengwuibm opened 10 years ago

pengwuibm commented 10 years ago

Now that we use template type for svec<N,STYPE>, we can simplify some of our internal macros inside the library to use N and STYPE instead.

Also current implementation uses many macros to declare interfaces that takes svec as data type. We can simply it by passing only STYPE and LANES.

wanghc78 commented 10 years ago

Regarding the STYPE naming, The original implementation uses int8_t, uint8_t, int16_t, uint16_t etc.

The new template based type uses char, unsigned char, short, unsigned short, etc We need choose one.

BTW, the char type is by default could be either singed or unsigned. GCC treats it as signed. So we don't meet problem here.

igtanase commented 10 years ago

I thought about this for a minute when doing it and decided to go for the short version, without "signed". This save some typing and most probably these will be used more often. I never actually declare a signed type in my programs. I believe is ok to go with gcc convention