设置线程数:
export OMP_NUM_THREADS=2
头文件
#include<omp.h>
编译命令:
g++ test.c -o test -fopenmp
查看线程数目:
omp_get_thread_num()
设置线程数:
export OMP_NUM_THREADS=2
头文件
#include<omp.h>
编译命令:
g++ test.c -o test -fopenmp
查看线程数目:
omp_get_thread_num()