mirror of
https://github.com/minio/minio.git
synced 2025-12-09 00:56:38 -05: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:
27
pkgs/crc32c/cpu/cpu_test.go
Normal file
27
pkgs/crc32c/cpu/cpu_test.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package cpu
|
||||
|
||||
import (
|
||||
. "gopkg.in/check.v1"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test(t *testing.T) { TestingT(t) }
|
||||
|
||||
type MySuite struct{}
|
||||
|
||||
var _ = Suite(&MySuite{})
|
||||
|
||||
func (s *MySuite) TestHasSSE41(c *C) {
|
||||
var bool = HasSSE41()
|
||||
c.Check(bool, Equals, 1)
|
||||
}
|
||||
|
||||
func (s *MySuite) TestHasAVX(c *C) {
|
||||
var bool = HasAVX()
|
||||
c.Check(bool, Equals, 1)
|
||||
}
|
||||
|
||||
func (s *MySuite) TestHasAVX2(c *C) {
|
||||
var bool = HasAVX2()
|
||||
c.Check(bool, Equals, 0)
|
||||
}
|
||||
Reference in New Issue
Block a user