# Program Listing for File Utils_CPU_info.hh

↰ Return to documentation for file (`Utils_CPU_info.hh`)

    /*--------------------------------------------------------------------------*\
     |                                                                          |
     |  Copyright (C) 2011                                                      |
     |                                                                          |
     |         , __                 , __                                        |
     |        /|/  \               /|/  \                                       |
     |         | __/ _   ,_         | __/ _   ,_                                |
     |         |   \|/  /  |  |   | |   \|/  /  |  |   |                        |
     |         |(__/|__/   |_/ \_/|/|(__/|__/   |_/ \_/|/                       |
     |                           /|                   /|                        |
     |                           \|                   \|                        |
     |                                                                          |
     |      Enrico Bertolazzi                                                   |
     |      Dipartimento di Ingegneria Industriale                              |
     |      Universita` degli Studi di Trento                                   |
     |      email: enrico.bertolazzi@unitn.it                                   |
     |                                                                          |
    \*--------------------------------------------------------------------------*/

    #ifndef UTILS_CPU_INFO_HH
    #define UTILS_CPU_INFO_HH

    #include <string>

    namespace Utils {

      #ifndef DOXYGEN_SHOULD_SKIP_THIS
      using std::string;
      void cpuId( unsigned long CPUInfo[4], unsigned long l );
      #endif

      void
      info(
        bool & bMMX,
        bool & bMMXplus,
        bool & bSSE,
        bool & bSSE2,
        bool & bSSE3,
        bool & bSSSE3,
        bool & bSSE41,
        bool & bSSE42,
        bool & bSSE4a,
        bool & bSSE5,
        bool & b3Dnow,
        bool & b3DnowExt
      );

      bool has_MMX();
      bool has_MMXplus();
      bool has_SSE();
      bool has_SSE2();
      bool has_SSE3();
      bool has_SSSE3();
      bool has_SSE41();
      bool has_SSE42();
      bool has_SSE4a();
      bool has_SSE5();
      bool has_3Dnow();
      bool has_3DnowExt();

      string cpuInfo();
    }

    #endif