Re: Looking for command for synchronization of threads

2013-01-31 Thread Sparsh Mittal
Thank you very much for the code. It works fine and is extremely useful.

Re: Looking for command for synchronization of threads

2013-01-31 Thread FG
On 2013-01-31 03:29, Sparsh Mittal wrote: Thanks. I wrote this: [...] It compiles but barrier does not get released. Can you please point out the fault. Pardon my mistake. I searched whole web, there are almost no examples of it online. Barrier doesn't release because you've only called wait()

Re: Looking for command for synchronization of threads

2013-01-31 Thread qznc
On Wednesday, 30 January 2013 at 22:58:36 UTC, Sparsh Mittal wrote: Background: I am implementing an iterative algorithm in parallel manner. The algorithm iteratively updates a matrix (2D grid) of data. So, I will "divide" the grid to different threads, which will work on it for single iterat

Re: Looking for command for synchronization of threads

2013-01-30 Thread Sparsh Mittal
I suggest looking at std.parallelism since it's designed for this kind of thing. That aside, all traditional synchronization methods are in core.sync. The equivalent of "sync" in Cylk would be core.sync.barrier. Thanks. I wrote this: #!/usr/bin/env rdmd import std.stdio; import std.con

Re: Looking for command for synchronization of threads

2013-01-30 Thread Sean Kelly
On Jan 30, 2013, at 2:58 PM, Sparsh Mittal wrote: > Background: > I am implementing an iterative algorithm in parallel manner. The algorithm > iteratively updates a matrix (2D grid) of data. So, I will "divide" the grid > to different threads, which will work on it for single iteration. After e

Looking for command for synchronization of threads

2013-01-30 Thread Sparsh Mittal
Background: I am implementing an iterative algorithm in parallel manner. The algorithm iteratively updates a matrix (2D grid) of data. So, I will "divide" the grid to different threads, which will work on it for single iteration. After each iteration, all threads should wait since next iterat