小编vik*_*h78的帖子

将Mandelbrot与OpenMP并行化

我有一个函数计算mandelbrot集我试图使用它并行化openMP.

#pragma omp parallel for private在每个之前for

static void calculer (Image * im, int nb_iter, double x_min, double x_max, double y_min, double y_max) {

    /* Discretisation de l'ensemble */
    double pasx = (x_max - x_min) / im -> nb_col;
    double pasy = (y_max - y_min) / im -> nb_lig;
    double cy = y_min;
    double new_zx;
    unsigned int l,c;
    // Calcul
    #pragma omp parallel for private ( pasx, pasy, im,nb_iter,x_min,x_max,y_min, y_max)
    for (l = 0; …
Run Code Online (Sandbox Code Playgroud)

c openmp mandelbrot

1
推荐指数
1
解决办法
608
查看次数

标签 统计

c ×1

mandelbrot ×1

openmp ×1