cpu

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package cpu detects the CPU features that sha1cd dispatches on.

It covers only what the assembly implementations need, which keeps start up cheap and avoids an external dependency. Every flag is false where a feature cannot be detected safely, which selects the generic implementation.

Index

Constants

This section is empty.

Variables

View Source
var ARM64 struct {
	HasSHA1 bool
}

ARM64 holds the features of the current arm64 CPU. All flags are false on other architectures.

View Source
var X86 struct {
	// HasAVX and HasAVX2 are set only when the OS also preserves the YMM
	// state, and HasAVX512F only when it preserves the ZMM and opmask state.
	HasAVX     bool
	HasAVX2    bool
	HasAVX512F bool
	HasBMI1    bool
	HasBMI2    bool
	HasSHA     bool
	HasSSSE3   bool
	HasSSE41   bool
}

X86 holds the features of the current amd64 CPU. All flags are false on other architectures.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL