简体   繁体   中英

How to find on which CPU&Core my thread is running

I have an app that use HPC, and it automatically assign each thread to specific CPU and Cores on the HPC. I would like to know to which CPU and Core my thread is assigned to.

GetCurrentProcessorNumber return the Core ID which my thread is run on, and I wish to know on which CPU it runs as well.

My HPC has at least 2 CPU's and 10 cores on each CPU

How can I do that?

Thanks!

您可能需要检查GetCurrentProcessorNumber API(或GetCurrentProcessorNumberEx如果您有超过 64 个逻辑处理器)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM