ermig1979 / Simd

C++ image processing and machine learning library with using of SIMD: SSE, AVX, AVX-512, AMX for x86/x64, VMX(Altivec) and VSX(Power7) for PowerPC, NEON for ARM.
http://ermig1979.github.io/Simd
MIT License
2.03k stars 406 forks source link

SSE4.1 / SSE4.2 support #180

Closed s-trinh closed 2 years ago

s-trinh commented 2 years ago

I am in the process to update to the latest version of Simd.

Looks like having SIMD_SSE41_ENABLE defined implies CPU support of SSE3, SSSE3, SSE4.1 and SSE4.2:

https://github.com/ermig1979/Simd/blob/bbeff9e9f7f7932466a4636c8a41df22c2049dc7/prj/cmake/x86.cmake#L14

https://github.com/ermig1979/Simd/blob/bbeff9e9f7f7932466a4636c8a41df22c2049dc7/src/Simd/SimdDefs.h#L197-L198

Wondering why were not everything renamed Sse42 instead of Sse41? Example:

https://github.com/ermig1979/Simd/blob/bbeff9e9f7f7932466a4636c8a41df22c2049dc7/src/Simd/SimdLib.cpp#L463

ermig1979 commented 2 years ago

Several months ago I merged code branches (sse and sse2 to sse2), (sse3, ssse3, sse41 and sse42 to sse41). Why the second is named 4.1 but not 4.2 ? Sse4.2 had only one function so I was lazy and choose name 4.1.

s-trinh commented 2 years ago

Thanks for the answer.

Maybe adding in the doc and/or in the code that sse41 actually implies sse42 would be better.