digitalmars.D - Cilk Plus and more
bearophile <bearophileHUGS lycos.com> writes:
An computer science popularization article about Cilk and related matters, that I did miss, from the August: http://software.intel.com/en-us/articles/data-and-thread-parallelism/ It explains the not too much hard to undestand task parallelism with the spawn and sync keywords, the parallel for loops, that haven ot fully enforced constraints:The compiler will detect violations and enforce these restrictions in most cases. Exceptions are when the comparison value and index variable are updated through pointers.<The Intel Cilk Plus Array Notation is similar to the vector syntax of D, you use: a[:] = b[:] + c[:] Instead of: a = b + c But the complete syntax supports a stride too: array_base[begin:length:stride] That allows code like this, similar to the Python NumPy one: a[0:5][0:8:2] Intrinsic functions like _sec_reduce_add remind me the desire for a sum() in Phobos: int a; int total = sum(a); // no exception here assert(total == 0); The Intel Cilk Plus Elemental Function annotated with __declspec(vector) seem similar to D2 pure functions, but the compieler seems to use them better (so it's not a matter of language, but implementation). I have a D version too of the Ambient Occlusion Benchmark (AOBench), of course. In the end a 16.5x with a 4-core CPU is nice. Bye, bearophile
Dec 14 2011
"F i L" <witte2008 gmail.com> writes:
bearophile wrote:I have a D version too of the Ambient Occlusion Benchmark (AOBench), of course.I would really like to see that. Is it OpenGL or DirectX (or CPU)?
Dec 14 2011