On 09/05/2017 03:15 AM, Brian wrote:
Thanks very much for your help, I finally had time to try your
suggestions. The initial example you showed does indeed have the same
problem of not iterating over all values :
double [] hugeCalc(int i){
// Code that takes a long time
import
On Friday, 1 September 2017 at 20:02:23 UTC, ag0aep6g wrote:
On 09/01/2017 07:27 AM, Brian wrote:
double [] hugeCalc(int i){
// Code that takes a long time
}
so if I do
double[][int] _hugeCalcCache;
foreach(i ; I)
_hugeCalcCache[i] = hugeCalc(i);
of course the required time is I.len
On 09/01/2017 07:27 AM, Brian wrote:
double [] hugeCalc(int i){
// Code that takes a long time
}
so if I do
double[][int] _hugeCalcCache;
foreach(i ; I)
_hugeCalcCache[i] = hugeCalc(i);
of course the required time is I.length * (a long time), so I wanted to
shorten this by splitting
On 08/31/2017 10:27 PM, Brian wrote:
> the 'real' problem is trying
> to split a huge calculation to different threads.
I still think you can take advantage of std.parallelism:
https://dlang.org/phobos/std_parallelism.html
Unfortunately, its features like asyncBuf, map, and amap do not stand
On Friday, 1 September 2017 at 04:43:29 UTC, Ali Çehreli wrote:
On 08/31/2017 06:59 PM, Brian wrote:
> Hello, I am trying to get the most trivial example of
multithreading
> working, but can't seem to figure it out.
> I want to split a task across threads, and wait for all those
tasks to
> finish
On 08/31/2017 06:59 PM, Brian wrote:
> Hello, I am trying to get the most trivial example of multithreading
> working, but can't seem to figure it out.
> I want to split a task across threads, and wait for all those tasks to
> finish before moving to the next line of code.
>
> The following 2 atte
On Friday, 1 September 2017 at 01:59:07 UTC, Brian wrote:
Hello, I am trying to get the most trivial example of
multithreading working, but can't seem to figure it out.
I want to split a task across threads, and wait for all those
tasks to finish before moving to the next line of code.
The fol
Hello, I am trying to get the most trivial example of
multithreading working, but can't seem to figure it out.
I want to split a task across threads, and wait for all those
tasks to finish before moving to the next line of code.
The following 2 attempts have failed :
--