Beispiel #1
0
func block(dig *digest, p []byte) {
	switch true {
	case cpu.HasSSE41() == true:
		blockSSE3(dig, p)
	default:
		blockGeneric(dig, p)
	}
}
Beispiel #2
0
func (s *MySuite) TestHasSSE41(c *C) {
	if runtime.GOOS == "linux" {
		var flag = cpu.HasSSE41()
		osCheck, err := hasCPUFeatureFromOS("sse4_1")
		c.Assert(err, IsNil)
		c.Check(flag, Equals, osCheck)
	}
}