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) } }
func block(dig *digest, p []byte) { switch true { case cpu.HasSSE41() == true: blockSSE3(dig, p) default: blockGeneric(dig, p) } }
func block(dig *digest, p []byte) { switch true { case cpu.HasAVX2() == true: blockAVX2(dig, p) case cpu.HasAVX() == true: blockAVX(dig, p) case cpu.HasSSE41() == true: blockSSE(dig, p) default: blockSoftware(dig, p) } }