Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.
/ target-features Public archive

return list of enabled cpu target features

Notifications You must be signed in to change notification settings

astraw/target-features

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

target-features

Return list of enabled cpu target features.

Example:

fn main() {
    println!("{:?}", target_features::target_features());
}

Could print various results:

  • ["fxsr", "sse", "sse2"]
  • ["aes", "avx", "avx2", "bmi2", "fma", "fxsr", "lzcnt", "popcnt", "rdseed", "sha", "sse", "sse2", "sse3", "sse4.1", "sse4.2", "ssse3", "xsave", "xsavec", "xsaveopt", "xsaves"]

This code is derived from https://gist.github.com/AngelicosPhosphoros/4f8c9f08656e0812f4ed3560e53bd600 .

About

return list of enabled cpu target features

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages