mirror of
https://github.com/pgsty/minio.git
synced 2026-08-07 16:21:14 +03:00
Fast CRC implementations ported from Intel's efforts
Provides fast CRC32C with PCLMULQDQ instructions in Golang The white papers on CRC32C calculations with PCLMULQDQ instruction can be downloaded from: http://www.intel.com/content/dam/www/public/us/en/documents/white-papers/crc-iscsi-polynomial-crc32-instruction-paper.pdf http://www.intel.com/content/dam/www/public/us/en/documents/white-papers/fast-crc-computation-paper.pdf
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// +build linux,amd64
|
||||
|
||||
package cpu
|
||||
|
||||
// #include "cpu.h"
|
||||
import "C"
|
||||
|
||||
func HasSSE41() int {
|
||||
return int(C.has_sse41())
|
||||
}
|
||||
|
||||
func HasAVX() int {
|
||||
return int(C.has_avx())
|
||||
}
|
||||
|
||||
func HasAVX2() int {
|
||||
return int(C.has_avx2())
|
||||
}
|
||||
Reference in New Issue
Block a user