摘要: 参考自:https://msdn.microsoft.com/en-us/library/hh873132.aspx 1 #include 2 #include 3 4 using namespace Concurrency; 5 6 // 缺省加速设备 7 void defa... 阅读全文
posted @ 2015-06-01 17:30 -学以致用- 阅读(679) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 6 using namespace std; 7 8 int psum[256]; 9 std::mutex g_mtx; 10 int g_sum = 0; 11 12 v... 阅读全文
posted @ 2015-06-01 15:14 -学以致用- 阅读(402) 评论(0) 推荐(0) 编辑
摘要: 引用自《C++ Concurrency in Action》341页 阅读全文
posted @ 2015-06-01 09:49 -学以致用- 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 参照:http://www.codeproject.com/Articles/543451/Parallel-Radix-Sort-on-the-GPU-using-Cplusplus-AMP对于普通PC电脑而言,在数据量较小时,多线程优于GPU加速;数据量较大时,GPU加速优于多线程。main.c... 阅读全文
posted @ 2015-06-01 09:31 -学以致用- 阅读(827) 评论(0) 推荐(0) 编辑