MCPcopy Index your code

hub / github.com/klauspost/cpuid / functions

Functions132 in github.com/klauspost/cpuid

↓ 366 callersMethodsetIf
setIf will set a feature if boolean is true.
cpuid.go:889
↓ 40 callersFunctionsetFeature
(c *CPUInfo, feature FeatureID, aliases ...string)
os_darwin_arm64.go:68
↓ 39 callersFunctionisSet
(hwc uint, value uint)
os_linux_arm64.go:222
↓ 32 callersFunctionCombineFeatures
CombineFeatures allows to combine several features for a close to constant time lookup.
cpuid.go:556
↓ 29 callersMethodset
(feat FeatureID)
cpuid.go:884
↓ 27 callersMethodinSet
(feat FeatureID)
cpuid.go:880
↓ 21 callersFunctionmaxExtendedFunction
()
cpuid.go:981
↓ 19 callersMethodhasSetP
hasSet returns whether all features are present.
cpuid.go:920
↓ 17 callersFunctionaddFeats
addFeats returns a fresh slice of base plus add, avoiding append aliasing.
cpuid_test.go:392
↓ 13 callersFunctionmaxFunctionID
()
cpuid.go:986
↓ 10 callersMethodHas
Has allows for checking a single feature. Should be inlined by the compiler.
cpuid.go:542
↓ 9 callersMethodString
()
mockcpu_test.go:22
↓ 8 callersMethodFeatureSet
FeatureSet returns all available features as strings.
cpuid.go:736
↓ 7 callersFunctionDetect
Detect will re-detect current CPU info. This will replace the content of the exported CPU variable. Unless you expect the CPU to change while you are
cpuid.go:478
↓ 7 callersMethodSupports
Supports returns whether the CPU supports all of the requested features.
cpuid.go:531
↓ 6 callersMethodX64Level
X64Level returns the microarchitecture level detected on the CPU. If features are lacking or non x64 mode, 0 is returned. See https://en.wikipedia.org
cpuid.go:633
↓ 6 callersFunctionsysctlGetInt
(unknown int, names ...string)
os_darwin_arm64.go:42
↓ 6 callersFunctionvendorID
()
cpuid.go:1157
↓ 5 callersMethodStrings
Strings returns an array of the detected features for FlagsSet.
cpuid.go:968
↓ 5 callersFunctionsysctlGetInt64
(unknown int, names ...string)
os_darwin_arm64.go:55
↓ 5 callersFunctionthreadsPerCore
()
cpuid.go:1003
↓ 4 callersMethodHasOneOf
HasOneOf returns whether the CPU supports one or more of the requested features.
cpuid.go:569
↓ 4 callersFunctionvalAsString
(values ...uint32)
cpuid.go:1802
↓ 3 callersMethodGOARM64
GOARM64 returns a value usable as the GOARM64 build setting for the detected CPU, e.g. "v8.4" or "v9.0,crypto". The ",crypto" suffix is appended when
cpuid.go:698
↓ 3 callersMethodHasAll
(f Features)
cpuid.go:564
↓ 3 callersFunctiondetectOS
(c *CPUInfo)
os_other_arm64.go:9
↓ 3 callersFunctionfamilyModel
()
cpuid.go:1078
↓ 3 callersFunctionlogicalCores
()
cpuid.go:1051
↓ 3 callersMethodnEnabled
nEnabled will return the number of enabled flags.
cpuid.go:940
↓ 2 callersMethodARM64Level
ARM64Level returns the ARMv8/ARMv9 architecture version supported by the CPU as (major, minor), e.g. 8, 4 for ARMv8.4-A or 9, 0 for ARMv9.0-A. Only ma
cpuid.go:674
↓ 2 callersMethodIa32TscAux
Ia32TscAux returns the IA32_TSC_AUX part of the RDTSCP. This variable is OS dependent, but on Linux contains information about the current cpu/core th
cpuid.go:757
↓ 2 callersFunctionParseFeature
ParseFeature will parse the string and return the ID of the matching feature. Will return UNKNOWN if not found.
cpuid.go:957
↓ 2 callersMethodRTCounter
RTCounter returns the 64-bit time-stamp counter Uses the RDTSCP instruction. The value 0 is returned if the CPU does not support the instruction.
cpuid.go:745
↓ 2 callersMethodRVProfile
RVProfile returns the RISC-V application profile level. 0 = unknown / base ISA only, 20 = RVA20, 22 = RVA22, 23 = RVA23. Returns 0 on non-RISC-V archi
cpuid.go:656
↓ 2 callersMethodVM
VM Will return true if the cpu id indicates we are in a virtual machine.
cpuid.go:865
↓ 2 callersFunctionaddInfo
(info *CPUInfo, safe bool)
detect_ref.go:15
↓ 2 callersFunctionarmCPU
(ids ...FeatureID)
cpuid_test.go:383
↓ 2 callersMethodhasOneOf
hasOneOf returns whether one or more features are present.
cpuid.go:930
↓ 2 callersFunctionparseISAString
(c *CPUInfo, isa string)
riscv_isa.go:7
↓ 2 callersFunctionparseLeaf0AH
(c *CPUInfo, eax, ebx, edx uint32)
cpuid.go:1824
↓ 2 callersFunctionriscvVendorID
(mvendorid uint64)
riscv_isa.go:88
↓ 2 callersMethodunset
(offset FeatureID)
cpuid.go:897
↓ 1 callersMethodDisable
Disable will disable one or several features.
cpuid.go:714
↓ 1 callersMethodEnable
Enable will disable one or several features even if they were undetected. This is of course not recommended for obvious reasons.
cpuid.go:723
↓ 1 callersMethodLogicalCPU
LogicalCPU will return the Logical CPU the code is currently executing on. This is likely to change when the OS re-schedules the running thread to ano
cpuid.go:778
↓ 1 callersFunctionParseURL
(s string, gw *zip.Writer)
testdata/getall.go:61
↓ 1 callersFunctionbrandName
()
cpuid.go:991
↓ 1 callersFunctioncacheLine
()
cpuid.go:1178
↓ 1 callersMethodcacheSize
()
cpuid.go:1193
↓ 1 callersFunctiondetectCacheLine
()
os_linux_riscv64.go:216
↓ 1 callersFunctiondetectFromCPUInfo
(c *CPUInfo)
os_linux_riscv64.go:184
↓ 1 callersFunctiondetectFromHWProbe
(c *CPUInfo, pairs []riscvHWProbePair)
os_linux_riscv64.go:113
↓ 1 callersMethodfrequencies
frequencies tries to compute the clock speed of the CPU. If leaf 15 is supported, use it, otherwise parse the brand string. Yes, really.
cpuid.go:788
↓ 1 callersFunctiongetInstAttributes
()
detect_arm64.go:11
↓ 1 callersFunctiongetMidr
()
detect_arm64.go:9
↓ 1 callersFunctiongetProcFeatures
()
detect_arm64.go:10
↓ 1 callersFunctiongetVectorLength
()
detect_ref.go:16
↓ 1 callersFunctionhasAMDMemEncryption
(available bool)
cpuid.go:1374
↓ 1 callersFunctionhasSGX
(available, lc bool)
cpuid.go:1329
↓ 1 callersMethodhasSet
hasSet returns whether all features are present.
cpuid.go:910
↓ 1 callersFunctionhypervisorVendorID
()
cpuid.go:1167
↓ 1 callersFunctioninitCPU
()
detect_ref.go:7
↓ 1 callersFunctionmockCPU
(def []byte)
mockcpu_test.go:34
↓ 1 callersMethodor
or with another flagset.
cpuid.go:903
↓ 1 callersFunctionphysicalCores
()
cpuid.go:1101
↓ 1 callersFunctionriscvHWProbe
(pairs []riscvHWProbePair)
os_linux_riscv64.go:77
↓ 1 callersFunctionsupport
()
cpuid.go:1391
↓ 1 callersMethodsupportAVX10
()
cpuid.go:1794
↓ 1 callersFunctionsysctlGetBool
(name string)
os_darwin_arm64.go:26
↓ 1 callersFunctionsysctlGetString
(name string)
os_darwin_arm64.go:34
↓ 1 callersFunctiontryToFillCPUInfoFomSysctl
(c *CPUInfo)
os_darwin_arm64.go:78
MethodAnyOf
AnyOf returns whether the CPU supports one or more of the requested features.
cpuid.go:547
FunctionBenchmarkFlags
(b *testing.B)
cpuid_test.go:333
FunctionDetectARM
DetectARM will detect ARM64 features. This is NOT done automatically since it can potentially crash if the OS does not handle the command. If in the f
cpuid.go:511
FunctionExample
()
cpuid_test.go:94
FunctionExampleCPUInfo_Ia32TscAux
This example will calculate the chip/core number on Linux Linux encodes numa id (<<12) and core id (8bit) into TSC_AUX.
cpuid_test.go:247
FunctionFlags
Flags will enable flags. This must be called *before* flag.Parse AND Detect must be called after the flags have been parsed. Note that this means that
cpuid.go:524
MethodIsVendor
IsVendor returns true if vendor is recognized as Intel
cpuid.go:731
MethodString
()
featureid_string.go:312
MethodString
()
featureid_string.go:366
MethodSveLengths
SveLengths returns arm SVE vector and predicate lengths in bits. Will return 0, 0 if SVE is not enabled or otherwise unable to detect.
cpuid.go:767
FunctionTestAMDMemEncryption
TestAMDMemEncryption tests AMDMemEncryption detection
cpuid_test.go:141
FunctionTestARM64Level
(t *testing.T)
cpuid_test.go:398
FunctionTestBrandNameZero
(t *testing.T)
cpuid_test.go:105
FunctionTestCPUID
There is no real way to test a CPU identifier, since results will obviously differ on each machine.
cpuid_test.go:26
FunctionTestCombineFeatures
(t *testing.T)
cpuid_test.go:258
FunctionTestDarwinL1DCache
Tests that the returned L1 data cache value matches the value returned from a call to the OS `sysctl` utility. Skips the test if we can't run it.
os_darwin_test.go:30
FunctionTestDarwinL1ICache
Tests that the returned L1 instruction cache value matches the value returned from a call to the OS `sysctl` utility. Skips the test if we can't run i
os_darwin_test.go:12
FunctionTestDumpCPUID
(t *testing.T)
cpuid_test.go:71
FunctionTestExample
(t *testing.T)
cpuid_test.go:50
FunctionTestGOARM64
(t *testing.T)
cpuid_test.go:435
FunctionTestHas
(t *testing.T)
cpuid_test.go:150
FunctionTestHasOneOf
(t *testing.T)
cpuid_test.go:364
FunctionTestIa32TscAux
Prints the value of Ia32TscAux()
cpuid_test.go:213
FunctionTestLastID
(t *testing.T)
cpuid_test.go:12
FunctionTestLastVendorID
(t *testing.T)
cpuid_test.go:18
FunctionTestLogicalCPU
Prints the value of LogicalCPU()
cpuid_test.go:230
FunctionTestMaxFunction
(t *testing.T)
cpuid_test.go:234
FunctionTestMocks
(t *testing.T)
mockcpu_test.go:160
FunctionTestParseISAString
(t *testing.T)
cpuid_test.go:462
next →1–100 of 132, ranked by callers