简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM