Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cpu/cpu.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cpu

import (
"github.com/klauspost/cpuid/v2"
cpuid "github.com/klauspost/cpuid/v2"
)

type X86CPU uint64
Expand Down Expand Up @@ -48,6 +48,7 @@ const (
AVX512DQ // AVX-512 Doubleword and Quadword Instructions
AVX512ER // AVX-512 Exponential and Reciprocal Instructions
AVX512F // AVX-512 Foundation
AVX512FP16 // AVX-512 FP16 Instructions
AVX512IFMA // AVX-512 Integer Fused Multiply-Add Instructions
AVX512PF // AVX-512 Prefetch Instructions
AVX512VBMI // AVX-512 Vector Bit Manipulation Instructions
Expand Down Expand Up @@ -83,6 +84,7 @@ func init() {
X86.Set(AVX512DQ, cpuid.CPU.Has(cpuid.AVX512DQ))
X86.Set(AVX512ER, cpuid.CPU.Has(cpuid.AVX512ER))
X86.Set(AVX512F, cpuid.CPU.Has(cpuid.AVX512F))
X86.Set(AVX512FP16, cpuid.CPU.Has(cpuid.AVX512FP16))
X86.Set(AVX512IFMA, cpuid.CPU.Has(cpuid.AVX512IFMA))
X86.Set(AVX512PF, cpuid.CPU.Has(cpuid.AVX512PF))
X86.Set(AVX512VBMI, cpuid.CPU.Has(cpuid.AVX512VBMI))
Expand Down
1 change: 1 addition & 0 deletions cpu/cpu_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ var x86 = map[string]X86Feature{
"AVX512DQ": AVX512DQ,
"AVX512ER": AVX512ER,
"AVX512F": AVX512F,
"AVX512FP16": AVX512FP16,
"AVX512IFMA": AVX512IFMA,
"AVX512PF": AVX512PF,
"AVX512VBMI": AVX512VBMI,
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/segmentio/asm

go 1.16

require github.com/klauspost/cpuid/v2 v2.0.6
require github.com/klauspost/cpuid/v2 v2.0.9
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github.com/klauspost/cpuid/v2 v2.0.6 h1:dQ5ueTiftKxp0gyjKSx5+8BtPWkyQbd95m8Gys/RarI=
github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=