Question

In OpenMP 3.0 in Fortran reduction is supported with the special construct, while in C/C++ it is delegated to a programmer. I was wondering if there is a special reason for that, because OpenMP 3.0 came out in 2008, so I thought it was enough time to implement it for C/C++ also. Is there any particular technical reason associated with C/C++, why it is still not supported for C/C++?

Était-ce utile?

La solution

As was mentioned in the comments the reason for OpenMP not supporting reduction by default for arrays is that it does not know the size of an array. Fortran supports reduction on arrays by default because it always knows the size of its arrays, no matter if static or dynamically allocated. C/C++ only know the size of static arrays.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top