Skip to content

Commit

Permalink
examples: Update expected output
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini committed Feb 10, 2022
1 parent 853350b commit 108814f
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions examples/performance/00_overview.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1480,8 +1480,6 @@
"output_type": "stream",
"text": [
"#define _POSIX_C_SOURCE 200809L\n",
"#define MIN(a,b) (((a) < (b)) ? (a) : (b))\n",
"#define MAX(a,b) (((a) > (b)) ? (a) : (b))\n",
"#define START_TIMER(S) struct timeval start_ ## S , end_ ## S ; gettimeofday(&start_ ## S , NULL);\n",
"#define STOP_TIMER(S,T) gettimeofday(&end_ ## S, NULL); T->S += (double)(end_ ## S .tv_sec-start_ ## S.tv_sec)+(double)(end_ ## S .tv_usec-start_ ## S .tv_usec)/1000000;\n",
"\n",
Expand Down Expand Up @@ -1510,7 +1508,7 @@
"} ;\n",
"\n",
"\n",
"int Kernel(struct dataobj *restrict f_vec, const float h_y, struct dataobj *restrict u_vec, const int x_size, const int y_size, const int z_size, const int time_M, const int time_m, const int x0_blk0_size, const int x_M, const int x_m, const int y_M, const int y_m, const int z_M, const int z_m, const int nthreads, struct profiler * timers)\n",
"int Kernel(struct dataobj *restrict f_vec, const float h_y, struct dataobj *restrict u_vec, const int x_size, const int y_size, const int z_size, const int time_M, const int time_m, const int x_M, const int x_m, const int y_M, const int y_m, const int z_M, const int z_m, const int nthreads, struct profiler * timers)\n",
"{\n",
" float **pr2_vec;\n",
" posix_memalign((void**)(&pr2_vec),64,nthreads*sizeof(float*));\n",
Expand Down Expand Up @@ -1563,25 +1561,22 @@
" float (*restrict r2)[z_size] __attribute__ ((aligned (64))) = (float (*)[z_size]) pr2[tid];\n",
"\n",
" #pragma omp for collapse(1) schedule(dynamic,1)\n",
" for (int x0_blk0 = x_m; x0_blk0 <= x_M; x0_blk0 += x0_blk0_size)\n",
" for (int x = x_m; x <= x_M; x += 1)\n",
" {\n",
" for (int x = x0_blk0; x <= MIN(x0_blk0 + x0_blk0_size - 1, x_M); x += 1)\n",
" for (int y = y_m - 2; y <= y_M + 2; y += 1)\n",
" {\n",
" for (int y = y_m - 2; y <= y_M + 2; y += 1)\n",
" #pragma omp simd aligned(u:32)\n",
" for (int z = z_m; z <= z_M; z += 1)\n",
" {\n",
" #pragma omp simd aligned(u:32)\n",
" for (int z = z_m; z <= z_M; z += 1)\n",
" {\n",
" r2[y + 2][z] = r1*(8.33333333e-2F*(u[t0][x + 4][y + 2][z + 4] - u[t0][x + 4][y + 6][z + 4]) + 6.66666667e-1F*(-u[t0][x + 4][y + 3][z + 4] + u[t0][x + 4][y + 5][z + 4]));\n",
" }\n",
" r2[y + 2][z] = r1*(8.33333333e-2F*(u[t0][x + 4][y + 2][z + 4] - u[t0][x + 4][y + 6][z + 4]) + 6.66666667e-1F*(-u[t0][x + 4][y + 3][z + 4] + u[t0][x + 4][y + 5][z + 4]));\n",
" }\n",
" for (int y = y_m; y <= y_M; y += 1)\n",
" }\n",
" for (int y = y_m; y <= y_M; y += 1)\n",
" {\n",
" #pragma omp simd aligned(f,u:32)\n",
" for (int z = z_m; z <= z_M; z += 1)\n",
" {\n",
" #pragma omp simd aligned(f,u:32)\n",
" for (int z = z_m; z <= z_M; z += 1)\n",
" {\n",
" u[t1][x + 4][y + 4][z + 4] = r1*(f[x + 1][y + 1][z + 1]*f[x + 1][y + 1][z + 1])*(8.33333333e-2F*(r2[y][z] - r2[y + 4][z]) + 6.66666667e-1F*(-r2[y + 1][z] + r2[y + 3][z]))*r0[x][y][z];\n",
" }\n",
" u[t1][x + 4][y + 4][z + 4] = r1*(f[x + 1][y + 1][z + 1]*f[x + 1][y + 1][z + 1])*(8.33333333e-2F*(r2[y][z] - r2[y + 4][z]) + 6.66666667e-1F*(-r2[y + 1][z] + r2[y + 3][z]))*r0[x][y][z];\n",
" }\n",
" }\n",
" }\n",
Expand Down

0 comments on commit 108814f

Please sign in to comment.