how to use in VS

九天雁翎 2008-05-04 04:15:55
can I ask the easiest way to make a program use the Multi-core tech in VS? Use a Lib? Any advise?
...全文
91 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
九天雁翎 2008-11-07
  • 打赏
  • 举报
回复
Now,I have known that the easist way is not the best way.
the best way to make a program use the Multi-core tech in VS is to learn how to program Multi-thread programs.
九天雁翎 2008-11-07
  • 打赏
  • 举报
回复
I know what you said about the point 2..............
yes,I hadn't knewn about it at all when you answer the question.
Thank you very mush.
Intel_merryhy 2008-05-05
  • 打赏
  • 举报
回复
I personally think that there are two easiest way to use Multi-core tech.

1. use threaded library, for example IPP, MKL.

Part of IPP function are inside threaded, so once you call the threaded IPP function in your MS VC program, nothing need to do, you will get multi-threading exe, which can run for instance, 2 threads on dual core automatically.

About how to use IPP in MSVS, you can see <<http://www.intel.com/support/performancetools/libraries/ipp/win/ia/sb/CS-021409.htm>>


2. to use OpenMP threading pragma.

for example,

#pragma omp parallel for
for (i=0;i<MAX;i++)
A[i]= c*A[i] + B[i];

MSVC support OpenMP since version 2005.

567

社区成员

发帖
与我相关
我的任务
社区描述
英特尔® 边缘计算,聚焦于边缘计算、AI、IoT等领域,为开发者提供丰富的开发资源、创新技术、解决方案与行业活动。
社区管理员
  • 英特尔技术社区
  • shere_lin
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧