3 ms·
The per-thread counts are a step in the right direction, but OpenMP will take care of this itself if you use the 'reduction' clause.
by rcfox 15y ago
The per-thread counts are a step in the right direction, but OpenMP will take care of this itself if you use the 'reduction' clause.
- scott_s 15y agoI don't think you can. He is essentially keeping a histogram: for a given i, how many times did we see it? That is not a scalar value, and reductions can only be applied to scalars. If you think I'm wrong, please show me the code you think that works, because I spent some time thinking about it, and I'm quite curious.
- dalke 15y agoI looked as well but it seems like reduction only works for scalars and not for arrays.