Re: Parallelization issues

2012-03-08 Thread ixid
Thank you, that's very helpful.

Re: Parallelization issues

2012-03-08 Thread Ali Çehreli
On 03/08/2012 12:09 PM, ixid wrote: > Changing a[][2] to a[][] as suggested made it work. It's not clear to me > why it should matter that it's not dynamic in that axis or are arrays > simply static or dynamic globally? The reason is that fixed-length arrays cannot be ranges themselves because p

Re: Parallelization issues

2012-03-08 Thread ixid
Never mind, it must be some hidden effect such as memory use in my function, sort works as expected with the parallelization.

Re: Parallelization issues

2012-03-08 Thread ixid
Changing a[][2] to a[][] as suggested made it work. It's not clear to me why it should matter that it's not dynamic in that axis or are arrays simply static or dynamic globally? It also doesn't fix the performance issue, parallel behaves in the same manner as the other implementation taking 3-4

Re: Parallelization issues

2012-03-08 Thread Ali Çehreli
On 03/08/2012 07:52 AM, bearophile wrote: ixid: This is a simple merge sorting implementation, a[0] and a[1] are the two halves of the array to be sorted, split into an int[][2] a array. This was done because I wanted to try parallel but that gives these errors: foreach(ref i;parallel(a)) merg

Re: Parallelization issues

2012-03-08 Thread bearophile
ixid: This is a simple merge sorting implementation, a[0] and a[1] are the two halves of the array to be sorted, split into an int[][2] a array. This was done because I wanted to try parallel but that gives these errors: foreach(ref i;parallel(a)) mergeSort(i); Error

Parallelization issues

2012-03-08 Thread ixid
This is a simple merge sorting implementation, a[0] and a[1] are the two halves of the array to be sorted, split into an int[][2] a array. This was done because I wanted to try parallel but that gives these errors: foreach(ref i;parallel(a)) mergeSort(i); Error: templa