Coder Social home page Coder Social logo

asdlei99 / cpu-core-counts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gpuopen-librariesandsdks/cpu-core-counts

0.0 1.0 0.0 9 KB

A sample demonstrating how to correctly detect physical core and logical processor counts on AMD processors.

License: MIT License

C++ 100.00%

cpu-core-counts's Introduction

CPU core counts

This self-contained code sample shows you how to correctly detect physical core and logical processor counts on AMD processors. The sample also makes recommendations about the default thread pool size you should create for game initialization and game execution, on AMD processors.

That recommendation is guidance only. Always profile and fit the thread pool size appropriately for your game's uses, since overall processor performance in games is affected by many factors.

How to build the sample on Windows

  • Clone this repo and open a 64-bit Visual Studio Developer Command Prompt inside the windows subdirectory.
  • cl.exe AMDCoreCount.cpp
  • cl.exe will build the code and generate a file called AMDCoreCount.exe which you can then run.

Support and suggestions

If you spot a bug, need any guidance, or would like to see the samples evolve in a particular way, file an issue and we'll take a look!

Changelog

  • v1.0

    • Initial release
  • v2.0

    • Removed the Windows XP compatibility. Windows 7 or greater is now required.
    • Added RYZEN_CORES_THRESHOLD to help document the thread pool sizing guidance code.
    • Show more information about the detected processor, including name and vendor.
    • More clarity that the thread pool sizes for game play and game initialization are guidance only: always remember to profile!

These self-contained code samples show you how to correctly detect physical and logical processor core counts.

Supported operating systems

  • Windows 7
  • Windows 10

Support and suggestions

If you spot a bug, or would like to see the samples evolve in a particular way, file an issue and we'll take a look!

cpu-core-counts's People

Contributors

amdmarco avatar rys avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.