awslabs / bike-kem

Additional implementation of BIKE (Bit Flipping Key Encapsulation)
Apache License 2.0
45 stars 11 forks source link

Runtime code path selection based on CPU capabilities #8

Closed dkostic closed 3 years ago

dkostic commented 3 years ago

Before this commit the code could be compiled for different platforms that support a specified x86 instruction set (PCLMUL, VPCLMUL, AVX2, AVX512). With this commit we change the code such that all the versions are compiled in a single binary and the selection of the correct functions is done in runtime based on the CPU capabilities. This means that the compiled binary can run on any CPU and automatically choose the most optimized code that can be executed on the CPU.

Signed-off-by: Dusan Kostic dkostic@amazon.com