OMP 编程

来源:互联网 发布:网络彩票平台 编辑:程序博客网 时间:2024/05/21 10:33

设置线程数:

export OMP_NUM_THREADS=2


头文件

#include<omp.h>


编译命令:

g++ test.c -o test -fopenmp


查看线程数目:

omp_get_thread_num()