steinwurf / cpuid

C++ library for detecting CPU capabilities
https://cpuid.steinwurf.com
Other
105 stars 21 forks source link

Instruction_set_checks #3

Closed nestorjhernandezm closed 10 years ago

nestorjhernandezm commented 10 years ago

Hi @mortenvp and @jpihl

Here is the detection of the instruction set. I created a map to use and check the corresponding registers. Let me know your thoughts.

nestorjhernandezm commented 10 years ago

The other thing that I could do besides the corrections that might arise here, is to set "void print_vendor_id" to "string get_vendor_id": Let me know what do you think..

mortenvp commented 10 years ago

Seems google test does not directly make command-line arguments available for the tests cases - it just leave the arguments it does not understand alone. Which also makes sense. http://stackoverflow.com/questions/5260907

We can use boost::program_options to parse those - but lets do that in another branch after merging this.

nestorjhernandezm commented 10 years ago

@mortenvp ,

Seems reasonable to do it with boost:program_options if we want to avoid the usage of global and extern variables.

nestorjhernandezm commented 10 years ago

Hi @jpihl and @mortenvp ,

Changes made. Let me know your opinion :wink:

nestorjhernandezm commented 10 years ago

Ok, will do the minor changes. Should I correct something else before merging this @mortenvp ? :)

mortenvp commented 10 years ago

No - I think that is fine.

nestorjhernandezm commented 10 years ago

Super! I'll merge it tomorrow morning. Then I'll review to the intrinsics! :D

mortenvp commented 10 years ago

@nestorjhernandezm Next steps before looking at the intrinsic (they will be added to fifi anyway), should be to do the following:

  1. Add cpuid to buildbot
  2. Make cpuid work on arm, mips, windows and mac (it can just return false for the flags initially) but we need a library that works everywhere - before we can start depending on it from other libraries.
nestorjhernandezm commented 10 years ago

@mortenvp Yes. I 'm aware of it. But since I have to deliver this as a project for the NC course, I need to make a short list of objectives for it (not that I'm not going to make the full one ;) ). In this case, let's coordinate with Daniel in order for him to be aware of the logistics that this involves :+1: