Reducing on array in OpenMP
Yes it is possible to do an array reduction with OpenMP. In Fortran it even has construct for this. In C/C++ you have to do it yourself. Here are two ways to do it. The first method makes private version of S for each thread, fill them in parallel, and then merges them into S … Read more