Thank you very much for reviewing code and making it better.
I have 2 question about your answer:
- From other working examples, I saw that in order to hold the values of each thread it is needed to create a dynamic array (
resultsfor my case) . And when the results are ready, they are pushed inside the that dynamic array by using thethreadid(). From your code, I understand that there is no need for that. Could you explain the inner workings ? - About @view inside innermost loop. Why do we need it ?
B.R.