1

I am using accumarray() to create a 3D array from a list of xyz coordinates PointCoors and their respective values PointValues like this:

Stack=accumarray([PointCoors(:,1),PointCoors(:,2),PointCoors(:,3)],PointValues,...
  StackSize,@max,uint16(0));

However I found out that accumarray() does not multithread (don't see why it shouldn't) and as a result of this the computation of this step takes too long.

Is there an alternative to accumarray() that can take advantage of multiple cores?

Thank you

McMa
  • 1,568
  • 7
  • 22
  • 1
    If you have a compatible GPU, and Parallel Computing Toolbox, there's an implementation of `accumarray` that runs on the GPU. – Edric Jul 14 '16 at 11:10
  • Do you mean at the File Exchange? I only found one that needs some rework to be used like I do in my example... – McMa Jul 14 '16 at 14:12
  • No, I mean the product from the MathWorks: http://www.mathworks.com/products/parallel-computing/ – Edric Jul 15 '16 at 07:20
  • I see now... "UNKNOWN_CUDA_ ERROR"... sadly the GPU doesn't seem to be compatible. Thanks for the tip anyway. – McMa Jul 15 '16 at 11:34

0 Answers0