c++reductionopenaccuser-definedpgi

How to implement user-defined reduction with OpenACC?


Is there a way to implement a user-defined reduction with OpenACC similar to declare reduction in OpenMP?

So that I could write something like #pragma acc loop reduction(my_function:my_result)

Or what would be the appropriate way to implement efficient reduction without the predefined operators?


Solution

  • User defined reductions aren't yet part of the OpenACC standard. While I'm not part of the OpenACC technical committee, I believe they have received requests for this but not sure if it's something being considered for the 3.0 standard.

    Since the OpenACC standard is largely user driven, I'd suggest you send a note to the OpenACC folks requesting this support. The more folks that request it, the more likely it is to be adopted in the standard.

    Contact info for OpenACC can be found at the bottom of https://www.openacc.org/about