西西河

主题:一个问题请教下 -- 小愚

共:💬4 🌺2 新:
全看树展主题 · 分页首页 上页
/ 1
下页 末页
家园 一个问题请教下

有没有哪个多核的计算机系统可以自动把单线程

程序自动进行多线分配的?比如一个

for(i=0;i<=10000;i++){}

它可以自动判断,如果可以的话,把进程分配

给各个CPU.然后得到局域加速?

家园 Search the term Itanium 2

Auto parallelization is a tall billing for any compiler.

I haven't heard of any parallelizing compilers that can

deal with general purpose programs written in C-like

languages using threads.

The closest thing to what you ask is Itanium, which

is based on the VLIW idea. Theoretically, if there is

no dependency between the loops, the compiler will

issue instructions for muliple loops in one shot. Note

the word theoretically. The early product wasn't very

impressive. It might have improved but I don't know.

In addition, languages like HighPerformanceFortran

include additional tags added by the programmer to

guide the compiler's parallelization effort. But those

compilers were originally developed for Vector

computers. I'm not sure if they have been ported

to systems with general-purpose CPUs.

Just my 2c. A compiler or architecture major will

give you a better explanation.

家园 thanks. It helps
家园 有一帮人在搞这项研究,叫做Open MP

以前在MSDN看到过一篇是介绍这种技术的,你可以看看

外链出处

要想进一步了解的话,可以上Open MP的总部去看看。

全看树展主题 · 分页首页 上页
/ 1
下页 末页


有趣有益,互惠互利;开阔视野,博采众长。
虚拟的网络,真实的人。天南地北客,相逢皆朋友

Copyright © cchere 西西河