随笔分类 -  OpenMP

摘要:// OpenMP4.cpp : 定义控制台应用程序的入口点。 // 临界区方法进行求和 #include "stdafx.h" #include #include #include #define NUM_THREADS 2 int _tmain(int argc, _TCHAR* argv[]) { clock_t t1, t2; omp_set_num_thre... 阅读全文
posted @ 2019-05-20 13:32 青衫客36 阅读(163) 评论(0) 推荐(0) 编辑
摘要:// OpenMP3.cpp : 定义控制台应用程序的入口点。 // reduction 子句方法进行求和 #include "stdafx.h" #include #include #include "time.h" #define NUM_THREADS 2 int _tmain(int argc, _TCHAR* argv[]) { clock_t t1 = clock(... 阅读全文
posted @ 2019-05-20 13:30 青衫客36 阅读(354) 评论(0) 推荐(0) 编辑
摘要:// OpenMP2.cpp : 定义控制台应用程序的入口点。 // for 指令方法进行求和 #include "stdafx.h" #include #include #include #include #define NUM_THREADS 2 int _tmain(int argc, _TCHAR * argv[]) { omp_set_num_threads(NU... 阅读全文
posted @ 2019-05-20 13:30 青衫客36 阅读(383) 评论(0) 推荐(0) 编辑
摘要:// OpenMP1.cpp : 定义控制台应用程序的入口点。 // 使用并行区域方法进行求和 #include "stdafx.h" #include #include #include #define NUM_THREADS 2 int _tmain(int argc, _TCHAR* argv[]) { omp_set_num_threads(NUM_THREADS)... 阅读全文
posted @ 2019-05-20 13:29 青衫客36 阅读(249) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示