Thank you, that's very helpful.
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
Never mind, it must be some hidden effect such as memory use in
my function, sort works as expected with the parallelization.
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
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
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
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