Closed wannesvanloock closed 4 years ago
Hi! Happy new year! :D
It seems that accumulation is done on an uninitialized matrix; adding ds_points.col(ind).setZero();
in the else
clause seems to give consistent results. I believe there is a macro that tells Eigen to initialize matrices to zero, but I haven't been using it.
I haven't extensively tested this on other data -- please let me know if there might still be something suspicious in there :D
Quick debugging! Thanks.
Probably a good idea to set ds_points
to zero in all implementations. I'll see if I can create a PR later today.
and a happy new year to you too.
Calling setZero()
globally on ds_points
is dangerous when ds_points
points to the same memory as the accumulator's data_map_
. So decided I won't change implementation.
I'm running into another issue with the parallel
GridAccumulator
in combination with theIndexAccumulatorProxy
. Consider the example belowThe output on my machine yields:
The result of the parallel implementation is clearly incorrect. It seems that it combines the wrong indices together.