Код: Выделить всё
#include
#include
#include
#include
int main(int argc, char** argv) {
#pragma omp parallel
{
int thread = omp_get_thread_num();
int totalThreads = omp_get_num_threads();
int schedcpu = sched_getcpu();
unsigned int getCPUID, getCPUNUMA;
getcpu(&getCPUID, &getCPUNUMA); // from sched.h
std::stringstream ss;
ss
Подробнее здесь: [url]https://stackoverflow.com/questions/79849456/what-is-the-difference-between-the-values-obtained-from-sched-getcpu-and-getcp[/url]
Мобильная версия