cpuid

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package cpuid provides generic types used to represent CPU features supported by the architecture.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPU

type CPU uint64

CPU is a bitset of feature flags representing the capabilities of various CPU architeectures that this package provides optimized assembly routines for.

The intent is to provide a stable ABI between the Go code that generate the assembly, and the program that uses the library functions.

func (CPU) Has

func (cpu CPU) Has(feature Feature) bool

func (*CPU) Set

func (cpu *CPU) Set(feature Feature, enabled bool)

type Feature

type Feature uint64

Feature represents a single CPU feature.

const (
	// None is a Feature value that has no CPU features enabled.
	None Feature = 0
	// All is a Feature value that has all CPU features enabled.
	All Feature = 0xFFFFFFFFFFFFFFFF
)

Jump to

Keyboard shortcuts

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