FAQ
Hi

Preface: I am that kind of nutcase that likes to write assembly now and
then. I did however find it a bit annoying to have to do cpu feature
detection, and looked for a library for it. The only one I could find,
however relied on cgo, and since that can be a off-putting to use in a
library, I decided to write a simple library for that, which - as a side
bonus - now also includes detection of modern instructions.

Purpose: Runtime detection of CPU features.

Features: Detects CPU name, vendor, cpu model&family, supported instruction
classes, cache line size, physical & logical core count on i386 and amd64
platforms.

Status: First release, there *may* be detection errors, since I don't have
access to the most modern CPUs. But if anything pops up, just open an issue
on the project. Also note that if you are running things in a VM, it may
hide some CPU features, so if you find something that doesn't match your
expectation, be sure you are not running in a VM.


Project home: https://github.com/klauspost/cpuid
Godoc: https://godoc.org/github.com/klauspost/cpuid

Comments, bugs and feedback is of course very welcome.


/Klaus


--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Vasiliy Tolstov at Apr 14, 2015 at 1:12 pm

    2015-04-13 22:48 GMT+03:00 Klaus Post <klauspost@gmail.com>:
    Hi

    Preface: I am that kind of nutcase that likes to write assembly now and
    then. I did however find it a bit annoying to have to do cpu feature
    detection, and looked for a library for it. The only one I could find,
    however relied on cgo, and since that can be a off-putting to use in a
    library, I decided to write a simple library for that, which - as a side
    bonus - now also includes detection of modern instructions.

    Purpose: Runtime detection of CPU features.

    Features: Detects CPU name, vendor, cpu model&family, supported instruction
    classes, cache line size, physical & logical core count on i386 and amd64
    platforms.

    Status: First release, there *may* be detection errors, since I don't have
    access to the most modern CPUs. But if anything pops up, just open an issue
    on the project. Also note that if you are running things in a VM, it may
    hide some CPU features, so if you find something that doesn't match your
    expectation, be sure you are not running in a VM.


    Project home: https://github.com/klauspost/cpuid
    Godoc: https://godoc.org/github.com/klauspost/cpuid

    Comments, bugs and feedback is of course very welcome.

    Thanks! Very useful.

    --
    Vasiliy Tolstov,
    e-mail: v.tolstov@selfip.ru
    jabber: vase@selfip.ru

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Klaus Post at Apr 14, 2015 at 3:02 pm

    On Tuesday, 14 April 2015 15:12:42 UTC+2, Vasiliy Tolstov wrote:

    Thanks! Very useful.
    Thanks. I just put in an update with future features like AVX-512, SHA and
    many others, so we should be well covered for the future.

    /Klaus

    --
    Vasiliy Tolstov,
    e-mail: v.to...@selfip.ru <javascript:>
    jabber: va...@selfip.ru <javascript:>
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Cinnabardk at Apr 17, 2015 at 8:43 am
    Nice package. Thanks for writing it!

    I learnt from your package that my humble CPU has the Intel RDRAND
    instruction.

    Now I can use github.com/losalamos/*rdrand*
    <https://github.com/losalamos/rdrand> to speed things up a bit..

    Den mandag den 13. april 2015 kl. 21.48.12 UTC+2 skrev Klaus Post:
    Hi

    Preface: I am that kind of nutcase that likes to write assembly now and
    then. I did however find it a bit annoying to have to do cpu feature
    detection, and looked for a library for it. The only one I could find,
    however relied on cgo, and since that can be a off-putting to use in a
    library, I decided to write a simple library for that, which - as a side
    bonus - now also includes detection of modern instructions.

    Purpose: Runtime detection of CPU features.

    Features: Detects CPU name, vendor, cpu model&family, supported
    instruction classes, cache line size, physical & logical core count on i386
    and amd64 platforms.

    Status: First release, there *may* be detection errors, since I don't have
    access to the most modern CPUs. But if anything pops up, just open an issue
    on the project. Also note that if you are running things in a VM, it may
    hide some CPU features, so if you find something that doesn't match your
    expectation, be sure you are not running in a VM.


    Project home: https://github.com/klauspost/cpuid
    Godoc: https://godoc.org/github.com/klauspost/cpuid

    Comments, bugs and feedback is of course very welcome.


    /Klaus

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedApr 13, '15 at 7:48p
activeApr 17, '15 at 8:43a
posts4
users3
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase