问题
I have
mpf_t omp_mpf_add(mpf_t out, mpf_t in) {
mpf_add(out, out, in);
return out;
}
And i want to make this function as an openmp reduction
# pragma omp declare reduction (mpf_add:mpf_t:omp_mpf_add(omp_out,omp_in)) \
initializer(omp_priv=omp_orig)
But i get error: reduction type cannot be an array type
error.
what should i change so that the function will work and i can use it with
#pragma omp parallel for reduction(mpf_add:x)
来源:https://stackoverflow.com/questions/47617628/openmp-with-custom-reduction-for-gmp-addition