Skip to content

Commit

Permalink
examples: revert gcc-5 turnaround
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebisbas committed Jan 23, 2022
1 parent c67a0b2 commit 7d8858b
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions examples/userapi/05_conditional_dimension.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -881,8 +881,6 @@
" _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);\n",
" _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);\n",
"\n",
" int i = 0;\n",
"\n",
" /* Begin section0 */\n",
" START_TIMER(section0)\n",
" for (int x = x_m; x <= x_M; x += 1)\n",
Expand All @@ -892,7 +890,7 @@
" if (f[x][y] != 0)\n",
" {\n",
" int r0 = 1;\n",
" g[i + 1] += r0;\n",
" g[1] += r0;\n",
" }\n",
" }\n",
" }\n",
Expand Down Expand Up @@ -925,12 +923,9 @@
"g = Function(name='g', shape=(1,), dimensions=(ci,), dtype=np.int32)\n",
"\n",
"# Extra Scalar used to avoid reduction in gcc-5\n",
"i = Scalar(name='i', dtype=np.int32)\n",
"eqi = Eq(i, 0)\n",
"\n",
"eq0 = Inc(g[i], 1, implicit_dims=(f.dimensions + (ci,)))\n",
"eq0 = Inc(g[0], 1, implicit_dims=(f.dimensions + (ci,)))\n",
"\n",
"op0 = Operator([eqi, eq0], opt=('advanced', {'par-collapse-ncores': 1000}))\n",
"op0 = Operator([eq0])\n",
"op0.apply()\n",
"\n",
"assert (np.count_nonzero(f.data) == g.data[0])\n",
Expand Down Expand Up @@ -1086,7 +1081,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.5"
"version": "3.9.7"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 7d8858b

Please sign in to comment.