문제

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++?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top