Re: Parallelizing code -- design problem in networkish code

2012-12-27 Thread Charles Hixson
On 12/14/2012 01:50 PM, Ali Çehreli wrote: On 12/13/2012 08:38 PM, Charles Hixson wrote: > Now what I was thinking of involved an array in another class (i.e., not > the Cell class) defined: > Cell[] cells; > and the Cell class, which includes: > public class Cell > { ... > Idno[] ups; >

Re: Parallelizing code -- design problem in networkish code

2012-12-14 Thread Sean Kelly
Do updates have to happen concurrently with read operations? Could you maybe queue updates and batch them at specific times instead? That would save you from having to protect every access. Or maybe different portions of the network could be owned by different threads? That makes it essentia

Re: Parallelizing code -- design problem in networkish code

2012-12-14 Thread Ali Çehreli
On 12/13/2012 08:38 PM, Charles Hixson wrote: > Now what I was thinking of involved an array in another class (i.e., not > the Cell class) defined: > Cell[] cells; > and the Cell class, which includes: > public class Cell > { ... > Idno[] ups; > ... > } > where ups is an array of Id#s which are i

Re: Parallelizing code -- design problem in networkish code

2012-12-13 Thread Charles Hixson
On 12/13/2012 07:30 PM, Ali Çehreli wrote: Parallelism, concurrency, and multi-threading in general are fascinating topics. I can't claim that I have extensive experience on these topics but I have written the following two chapters after studying the std.parallelism and std.concurrency modules:

Re: Parallelizing code -- design problem in networkish code

2012-12-13 Thread Ali Çehreli
Parallelism, concurrency, and multi-threading in general are fascinating topics. I can't claim that I have extensive experience on these topics but I have written the following two chapters after studying the std.parallelism and std.concurrency modules: http://ddili.org/ders/d.en/parallelism

Parallelizing code -- design problem in networkish code

2012-12-13 Thread Charles Hixson
I'm trying to parallelize some code which is essentially a network of cells with an index. I can make the cells immutable, if I route all access to them via the index, AND if I can update the index. The index would not need to have items deleted, but updates would cause it to point to differe