Re: sliced().array compatibility with parallel?

2016-01-10 Thread Marc Schütz via Digitalmars-d-learn
On Sunday, 10 January 2016 at 01:16:43 UTC, Ilya Yaroshenko wrote: On Saturday, 9 January 2016 at 23:20:00 UTC, Jay Norwood wrote: I'm playing around with win32, v2.069.2 dmd and "dip80-ndslice": "~>0.8.8". If I convert the 2D slice with .array(), should that first dimension then be

Re: sliced().array compatibility with parallel?

2016-01-10 Thread Russel Winder via Digitalmars-d-learn
On Sun, 2016-01-10 at 01:46 +, Jay Norwood via Digitalmars-d-learn wrote: > […] >  // processed non-parallel works ok >  foreach( dv; dv2){ >  if(dv != dv){ // test for NaN >  return 1; >  } >  } > >  // calculated parallel leaves out processing of

Re: sliced().array compatibility with parallel?

2016-01-10 Thread Jay Norwood via Digitalmars-d-learn
On Sunday, 10 January 2016 at 11:21:53 UTC, Marc Schütz wrote: I'd say, if `shared` is required, but it compiles without, then it's still a bug. Yeah, probably so. Interestingly, without 'shared' and using a simple assignment from a constant (means[i]= 1.0;), instead of assignment from

Re: sliced().array compatibility with parallel?

2016-01-10 Thread Jay Norwood via Digitalmars-d-learn
On Sunday, 10 January 2016 at 03:23:14 UTC, Ilya wrote: I will add significantly faster pairwise summation based on SIMD instructions into the future std.las. --Ilya Wow! A lot of overhead in the debug build. I checked the computed values are the same. This is on my laptop corei5. dub -b

Re: sliced().array compatibility with parallel?

2016-01-10 Thread Jay Norwood via Digitalmars-d-learn
On Sunday, 10 January 2016 at 12:11:39 UTC, Russel Winder wrote:  foreach( dv; dvp){  if(dv != dv){ // test for NaN  return 1;  }  }  return(0); } I am not convinced these "Tests for NaN" actually test for NaN. I believe you have to use isNan(dv). I

Re: sliced().array compatibility with parallel?

2016-01-09 Thread Jay Norwood via Digitalmars-d-learn
On Sunday, 10 January 2016 at 00:41:35 UTC, Ilya Yaroshenko wrote: It is a bug (Slice or Parallel ?). Please fill this issue. Slice should work with parallel, and array of slices should work with parallel. Ok, thanks, I'll submit it.

Re: sliced().array compatibility with parallel?

2016-01-09 Thread Ilya Yaroshenko via Digitalmars-d-learn
On Saturday, 9 January 2016 at 23:20:00 UTC, Jay Norwood wrote: I'm playing around with win32, v2.069.2 dmd and "dip80-ndslice": "~>0.8.8". If I convert the 2D slice with .array(), should that first dimension then be compatible with parallel foreach? I find that without using parallel, all

sliced().array compatibility with parallel?

2016-01-09 Thread Jay Norwood via Digitalmars-d-learn
I'm playing around with win32, v2.069.2 dmd and "dip80-ndslice": "~>0.8.8". If I convert the 2D slice with .array(), should that first dimension then be compatible with parallel foreach? I find that without using parallel, all the means get computed, but with parallel, only about half of

Re: sliced().array compatibility with parallel?

2016-01-09 Thread Jay Norwood via Digitalmars-d-learn
for example, means[63] through means[251] are consistently all NaN when using parallel in this test, but are all computed double values when parallel is not used.

Re: sliced().array compatibility with parallel?

2016-01-09 Thread Ilya Yaroshenko via Digitalmars-d-learn
On Saturday, 9 January 2016 at 23:20:00 UTC, Jay Norwood wrote: I'm playing around with win32, v2.069.2 dmd and "dip80-ndslice": "~>0.8.8". If I convert the 2D slice with .array(), should that first dimension then be compatible with parallel foreach? [...] It is a bug (Slice or Parallel

Re: sliced().array compatibility with parallel?

2016-01-09 Thread Ilya Yaroshenko via Digitalmars-d-learn
On Saturday, 9 January 2016 at 23:20:00 UTC, Jay Norwood wrote: I'm playing around with win32, v2.069.2 dmd and "dip80-ndslice": "~>0.8.8". If I convert the 2D slice with .array(), should that first dimension then be compatible with parallel foreach? [...] Oh... there is no bug. means

Re: sliced().array compatibility with parallel?

2016-01-09 Thread Jay Norwood via Digitalmars-d-learn
On Sunday, 10 January 2016 at 01:54:18 UTC, Jay Norwood wrote: ok, thanks. That works. I'll go back to trying ndslice now. The parallel time for this case is about a 2x speed-up on my corei5 laptop, debug build in windows32, dmd. D:\ec_mars_ddt\workspace\nd8>nd8.exe parallel time msec:2495

Re: sliced().array compatibility with parallel?

2016-01-09 Thread Ilya via Digitalmars-d-learn
On Sunday, 10 January 2016 at 02:43:05 UTC, Jay Norwood wrote: On Sunday, 10 January 2016 at 01:54:18 UTC, Jay Norwood wrote: [...] The parallel time for this case is about a 2x speed-up on my corei5 laptop, debug build in windows32, dmd. [...] I will add significantly faster pairwise

Re: sliced().array compatibility with parallel?

2016-01-09 Thread Jay Norwood via Digitalmars-d-learn
On Sunday, 10 January 2016 at 01:16:43 UTC, Ilya Yaroshenko wrote: On Saturday, 9 January 2016 at 23:20:00 UTC, Jay Norwood wrote: I'm playing around with win32, v2.069.2 dmd and "dip80-ndslice": "~>0.8.8". If I convert the 2D slice with .array(), should that first dimension then be