OpenMp with custom reduction for GMP addition

会有一股神秘感。 提交于 2019-12-11 08:18:57

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!