openmp--test how many threads used
来源:互联网 发布:itools mac版 破解 编辑:程序博客网 时间:2024/05/20 05:09
should add the compiler directive:
#include <stdio.h>#include <omp.h>int main(){int tid;#pragma omp parallel tid = omp_get_num_threads(); printf("thread = %d\n",tid);return 0;}
results:
thread = 8
if do not add the compile directive:
#include <stdio.h>#include <omp.h>int main(){int tid; tid = omp_get_num_threads(); printf("thread = %d\n",tid);return 0;}
the result will be
thread = 1
- openmp--test how many threads used
- Genereate a histogram of how many times each unique word is used in that test
- How to set number of threads in OpenMP?
- How many permissions used in the famous IM app?
- Find Out How Many File Descriptors Are Being Used
- Parallel Reduction --- (5) Question: How Many Threads on Earth We Need?
- 欧拉项目 Problem 17 of how many letters would be used?
- How many
- Used for Login Test
- How to used HttpModule
- How threads differ from processes
- How many zeros and how many digits?
- How many zeros and how many digits?
- how many java objects?
- How many的用法
- How many N
- How many different numbers
- How many fibs
- 微软认证考试70-461 Modify Data 数据修改 --24%比重--(1)
- 如何看懂oracle 直方图
- [Leetcode] Jump Game ii
- 挑选万种vs 配色方案~~
- 递归 栈 线索 中序遍历二叉树
- openmp--test how many threads used
- 新的起点
- 【D3D11游戏编程】学习笔记二十二:Cube Mapping应用之二:反射的实现
- Windows Server 2008 IIS 7.0 WebDAV设置
- java:reference C++:pointer
- 二叉树非递归遍历
- Ubuntu安装dos2unix工具
- hdu2036
- 【学习笔记】用python实现bubblesort以及shakersort