01_tutorial_getting_started.ipynb 223 KB
Newer Older
1
2
3
4
5
6
7
8
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
Markus Holzer's avatar
Markus Holzer committed
9
10
11
12
13
    "import pystencils as ps\n",
    "from pystencils import plot as plt\n",
    "\n",
    "import numpy as np\n",
    "import sympy as sp"
14
15
16
17
18
19
20
21
22
23
24
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Tutorial 01: Getting Started\n",
    "\n",
    "\n",
    "## Overview\n",
    "\n",
Martin Bauer's avatar
Martin Bauer committed
25
26
27
    "*pystencils* is a package that can speed up computations on *numpy* arrays. All computations are carried out fully parallel on CPUs (single node with OpenMP, multiple nodes with MPI) or on GPUs.\n",
    "It is suited for applications that run the same operation on *numpy* arrays multiple times. It can be used to accelerate computations on images or voxel fields. Its main application, however, are numerical simulations using finite differences, finite volumes, or lattice Boltzmann methods. \n",
    "There already exist a variety of packages to speed up numeric Python code. One could use pure numpy or solutions that compile your code, like *Cython* and *numba*. See [this page](demo_benchmark.ipynb) for a comparison of these tools.\n",
28
    "\n",
Martin Bauer's avatar
Martin Bauer committed
29
    "![Stencil](../img/pystencils_stencil_four_points_with_arrows.svg)\n",
30
    "\n",
Martin Bauer's avatar
Martin Bauer committed
31
    "As the name suggests, *pystencils* was developed for **stencil codes**, i.e. operations that update array elements using only a local neighborhood. \n",
32
    "It generates C code, compiles it behind the scenes, and lets you call the compiled C function as if it was a native Python function. \n",
Martin Bauer's avatar
Martin Bauer committed
33
    "But lets not dive too deep into the concepts of *pystencils* here, they are covered in detail in the following tutorials. Let's instead look at a simple example, that computes the average neighbor values of a *numpy* array. Therefor we first create two rather large arrays for input and output:"
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "input_arr = np.random.rand(1024, 1024)\n",
    "output_arr = np.zeros_like(input_arr)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We first implement a version of this algorithm using pure numpy and benchmark it."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "def numpy_kernel():\n",
    "    output_arr[1:-1, 1:-1] = input_arr[2:, 1:-1] + input_arr[:-2, 1:-1] + \\\n",
    "                             input_arr[1:-1, 2:] + input_arr[1:-1, :-2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
Markus Holzer's avatar
Markus Holzer committed
73
      "4.65 ms ± 22.7 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
     ]
    }
   ],
   "source": [
    "%%timeit \n",
    "numpy_kernel()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now lets see how to run the same algorithm with *pystencils*."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
96
97
98
99
100
101
      "text/latex": [
       "$\\displaystyle {dst}_{(0,0)} \\leftarrow \\frac{{src}_{(1,0)}}{4} + \\frac{{src}_{(0,1)}}{4} + \\frac{{src}_{(0,-1)}}{4} + \\frac{{src}_{(-1,0)}}{4}$"
      ],
      "text/plain": [
       "Assignment(dst_C, src_E/4 + src_N/4 + src_S/4 + src_W/4)"
      ]
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "src, dst = ps.fields(src=input_arr, dst=output_arr)\n",
    "\n",
    "symbolic_description = ps.Assignment(dst[0,0], \n",
    "                                     (src[1, 0] + src[-1, 0] + src[0, 1] + src[0, -1]) / 4)\n",
    "symbolic_description"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
123
124
125
126
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAMQAAADTCAYAAADedbxIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAJ/UlEQVR4nO3cf2jU9x3H8dcnl8SL8aLV09hpbeta/ymMunWyVufagZWIPwgbxT8srLKNVtuZjZU66B+CcxUGXaDgNoaw1spa21VQ8AyDCjZaGLhNGJu/t4Qq/jhqYrTxx10+++OS2zuXXO5yuXy/t93zAYHc3febe6PfZ+5733zv67z3ApBRE/YAQCUhCMCoDXuAauMSyaik5ZIWSoqMsehtSScknfQtcfZrA+J4DxEcl0jOk/SupC+NY7UOST/2LfH05EwFi12mYL2s8cUgSSslfWsSZsEoCCJY3yhxvSfLOgXyIohgNZa43tSyToG8CCJYbsQ9fddrtPnpBWpd8KjOnawvej1MCoIIW7RxQNvfv6glz/aFPQoIInx19dLMZo4gVQiCAAyCAAyCAAxO3agEW1vnqetUVJcu1Gvlhh6t3ngj7JGqFUFUgp37L4Y9AjLYZQIMggAMdpnCtmr2oryPHbp2JsBJIIII39BG37E3pt3b5mjf2fMhT1TV2GWqBANp6djBmGbNTYU9SrUjiErQsbdJS9f0yXEOX9gIImzplNR5IKYV6zm5rwIQRNgO72nSsrV9qhnr49UICkGErft0vT7eN1Ovrl6kK911am+bE/ZI1YyjTGF78Y2kLv+7Sem0tOMFr7b2q2GPVM14hQjbnf4GDQxk9pdef9uJq6CEiiDCdrPnPnk/eHjJS/03p4U7UHUjiGAN//WfTtfoTv9/LzzgfY1u9txXcD1MGoII1q3ht3qnj1ji3t2oUndz39vdGrEcJ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8PsqSbpT7MAkIImyzmq/rR296ffUZSc4r2vhF2CNVM4IIW+P0O5oeT0mSolP7sm+2EQqCqATTBneTpjT0hTxJ1eMPc5UgNqNXtXUNOYdbEQJeIQCDV4hKsLV1nrpORXXpQr1WbujR6o0jD8ciEARRCXbuvxj2CMhglwkwCAIw2GUK26rZi/I+dujamQAngQgifEMbfcfemHZvm6N9Z8+HPFFVY5epEgykpWMHY5o1NxX2KNWOICpBx94mLV3DaRsVgCDClk5JnQdiWrGe0zYqAEGE7fCeJi1b26eaSNiTQAQRvu7T9TryQZNeWzdfV7rr1N42J+yRqhlHmcL20s5k9vtNyx9UW/vVMZbGJOMVopLsOtoV9gjVjiAAgyCCVepFsLh4VkAIIlilHlrldPCAEESwPilxvc6yToG8CCJYb0k6Pc51/iDp+CTMglFwbdeAuUTSSXpcmYsdj3XY+7akE74l/lkQcyGDIACDXSbAIAjA+A9JIWcDPN19qQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 216x216 with 1 Axes>"
      ]
127
     },
Martin Bauer's avatar
Martin Bauer committed
128
129
130
     "metadata": {
      "needs_background": "light"
     },
131
132
133
134
135
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(3,3))\n",
136
    "ps.stencil.plot_expression(symbolic_description.rhs)"
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Here we first have created a symbolic notation of the stencil itself. This representation is built on top of *sympy* and is explained in detail in the next section. \n",
    "This description is then compiled and loaded as a Python function."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "kernel = ps.create_kernel(symbolic_description).compile()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
Martin Bauer's avatar
Martin Bauer committed
160
    "This whole process might seem overly complicated. We have already spent more lines of code than we needed for the *numpy* implementation and don't have anything running yet! However, this multi-stage process of formulating the algorithm symbolically, and just in the end actually running it, is what makes *pystencils* faster and more flexible than other approaches.\n",
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
    "\n",
    "Now finally lets benchmark the *pystencils* kernel."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "def pystencils_kernel():\n",
    "    kernel(src=input_arr, dst=output_arr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
Markus Holzer's avatar
Markus Holzer committed
184
      "951 µs ± 15 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)\n"
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
     ]
    }
   ],
   "source": [
    "%%timeit\n",
    "pystencils_kernel()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This benchmark shows that *pystencils* is a lot faster than pure *numpy*, especially for large arrays. \n",
    "If you are interested in performance details and comparison to other packages like Cython, have a look at [this page](demo_benchmark.ipynb).\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Short *sympy* introduction\n",
    "\n",
    "In this tutorial we continue with a short *sympy* introduction, since the symbolic kernel definition is built on top of this package. If you already know *sympy* you can skip this section. \n",
    "You can also read the full [sympy documentation here](http://docs.sympy.org/latest/index.html)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sympy as sp\n",
    "sp.init_printing()  # enable nice LaTeX output"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "*sympy* is a package for symbolic calculation. So first we need some symbols:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
236
237
238
      "text/plain": [
       "sympy.core.symbol.Symbol"
      ]
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x = sp.Symbol(\"x\")\n",
    "y = sp.Symbol(\"y\")\n",
    "type(x)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The usual mathematical operations are defined for symbols:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
265
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAKoAAAAYCAYAAABqdGb8AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAFRElEQVRoBe2b63HUMBDHDyYFAKmA0AGPDpIOklBBoAMYvuVbBjoIVACkg4QK8ugAOoC5DsL/ZySNzpb8kGXd3eCd0UnW8+/d1e5KTh7c398vhtLp6ekjjflgxu2Z/ET1y6Fzzf1nDlgOtOnVju00MP+oSd/aMSqfq3yr9MzWzfnMgQQORPXqYcJkDHkj5dz3xn5UeU91z726uThzYCgHonqVqqhY05uhKOr9pdg2bKg3zc8jOLDFfI3qVZKiihGflfx4lAV+qe6uL3/V9536zha4L8NMP/GtwTPVPVLyNz3eDf5uFQlzVK9SY1THAE0O4w6VXrjKjoLG0H9X+aeOrnNzkwM/xDcOs9YoUIYc/9V+pfRcCVf6+V/zdv2CX4idXiVZVPvKmoxdTHz6QmXfwtoujVz9YOwH5e8bjXNFHw78USd4jSDh5YVSg//iL0bgreG3ittDwtzQq2SLaiZ7r/wAFphn8l8dLEGxuSUoQsLDoQ9XuBGWJQOeO81x1JN58Bl+uxuanuNctwx43Vx9CloPJW3oVZJFNZPBhHOVcTHsbiwku72LjtW/pNJgdUibQsXwGD7D7zHvXxIvShrUq1SLyp0pL0DuSAxp3blqJ+b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wwYk3BzsFv64kYdR1E4I/QN52JKCT3lhxYcJ8IvnhsqnVTiDi2pOdKwdh7zFosKugkcHb8ofJBF/G93+w/7iiesrEulG+0xxoior/cLWUUiDm0fAAAAABJRU5ErkJggg==\n",
Markus Holzer's avatar
Markus Holzer committed
266
267
268
269
270
271
272
      "text/latex": [
       "$\\displaystyle x^{2} \\left(x + y + 5\\right) + x^{2}$"
      ],
      "text/plain": [
       " 2                2\n",
       "x ⋅(x + y + 5) + x "
      ]
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr = x**2 * ( y + x + 5) + x**2\n",
    "expr"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now we can do all sorts of operations on these expressions: expand them, factor them, substitute variables:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
298
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAIYAAAAXCAYAAADOQzd3AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAEbUlEQVRoBeWZ7VHcMBCGD4YCSNIB6QBIBUAHkFQAdBCGf/xjoINABYR0AKmAjxJIBbm5DsjzGMsjzNnBn+eb2xmdZFnafbVa7a58S8/Pz6OqdHJyssacbcqYYvsL5ZT+R+pBExhXAXicghS7tE//5KW5OL9lulipqYYz5j3B+ML51N+pflM++DxwOgPvYcBI+wftB8rn0LdAdaEulmsq4ZR5V9HcT7T1HvNABxiD3i6QRr5G33roWKC6UBe1PAZKzIeMXZSpgueB9Bb38wC0B4yFuliqk2MEwBiIIeQb5Yr2eeifpxrcGvQu9SKGkldbFeuikWHIFWYmc9eUG9pzZRzgNXyIfYP2XCSf4Mx7Zg9l3oOzpGqU10Vjw1B8ytQETgU3BlltSfVGg9MbiYnnHu3BG0WKVyM+on3rqql9Xq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T+JGUHrTew/A0Y1bcMwkZ8AAAAASUVORK5CYII=\n",
Markus Holzer's avatar
Markus Holzer committed
299
300
301
302
303
304
305
      "text/latex": [
       "$\\displaystyle x^{3} + x^{2} y + 6 x^{2}$"
      ],
      "text/plain": [
       " 3    2        2\n",
       "x  + x ⋅y + 6⋅x "
      ]
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr.expand()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
323
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAHoAAAAYCAYAAAA1Zem1AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAEpklEQVRoBe2Z3VEjMQzHF4YCcpQQOuCjAkIHwFUA6QCGJ3hjuA6ACjjoIFwFfHQAHRyXDrj/b1l7nMVrYidr8rCaceSVLVkrWbK8WXp/fy9i4ezsrCeek4qvX+ED0cexsrr5eSywkrjMhZw6NLzqX6r/pLZmaB1eLAssJ6pzKOcOHN4L9fuirTu0rrtAFkh1NNH8OOt7aGOYtD+rqI7fsYDPrkmOlqArNfc8xvGvoj076wW7mnukCV0GCFopeZDsin0tLKUUY5ZbHQnEWbdqG+q7znenTfQ1b1eELeHjiYHuYWoLyHYcly7ciGYDTX0cPRa+YtJMjpYQUi+F2J760zq5p/l/NH9DuINIC1Q2J7CO1b+HXZjndeGJYljPFMjbwuPUqrsQM05msR1h8wx+5TkA7EQ2RxaQPhSNpLJyZ2dZNLDIHPTBqURv6eRqKYLHZ3fsjL2HSY7WIiaScbQ5Zzmnp0nF++KxVzPxtA0YgbYokKyP7MaRh7233ZcRvQw2l0ZfdGqpf2rHSY6WDFICCoMtSGDQgRpHUd/OszK6TtAC2JdzdxycNTmIvfeto8WM4w6rOVvCB2pE7s+K9qA5d/SFf1S0WMTOc1POBH+MDhOMLT04+nD2PenZpv9q7Fp4r6XlfWI3ReR2Q1Tjl79q6HYrWpNdoe8s68cAX7t+0UR4ULtWG+iZdMwmqFd5IkUDir4EuHLoEFj+09BJZY+RRurvvy8aGSon4AdgE7+gmxpRjqObdMHe/dLRmkQkuy9CaoDR7ODV2rgekwBF33ycGXXwLf+JJn2IGjY8QCaq6x3MTiXXHH+kj3Ey1bXxi1nhtzpkFzPH0MHo3Tep+1GT3LOTq8+zaDi8EJ5XemLDlDKRW4OZdJCOVJiDmkweWZN38NUPvGPTu7kfgIjec+Q4wFp1mh1uQR8j2/WToVErEaxkzHoKZ36vdLSUshdtEQHfi32MtPQ7qw7i9zmyEJ3MxPWKI2lq0HyzyXEokWKjSGNEO7S6UUX6AM2Zuz6SifCmQGGMmqoOZXC5Z3Q5QcLMi5WFF0TRerS6hIRn0siXclrWIVZtIt5mt4oZG1H91gMkVnbsfDZWyH6+aGf+20rlQC7hFEIIYifyEi4TRck0d2SxBgGZn3ZdZh2CCnoG0de1BVOyns+OThxP+KoOHLX4zJdhiOhXIprdSXurDE7UWRCNMVOUWHpihwjY8vDm1MGzfJA04eTKHuhLJZ4VtDZZ9l7YFs7qE7EctQcNypT11gqMapw/KF+Icag2UmP3cMizAWwaZ84McCNe347MqUOs+mQyKlqMa+6tyPBFD/RWQXrsoIsa/gGIWL5nNx0j+HU4058arBILUoh7HX+CNCkWKzI4X+skFWNNQiUPhw+Ek/6Umbc+TXpC11ocOwTtGqk7N2Aob0XakiJjyaVFgwxE5JDVSlCfNMk15vyDkvSbrE/CamQj7F0U/B+du52eno7U+rnXjV1POr6oHRk+9W/VLszzImPp2VcbGR05o78DuLJwVlO9LjIQEauK5CNhvilfqv8tZ3OCkTjDbebMfkYbhWUwzo9d4agPGYa/w80WqDbmnbC9MfwH+JA6Vr0VD58AAAAASUVORK5CYII=\n",
Markus Holzer's avatar
Markus Holzer committed
324
325
326
327
328
329
330
      "text/latex": [
       "$\\displaystyle x^{2} \\left(x + y + 6\\right)$"
      ],
      "text/plain": [
       " 2            \n",
       "x ⋅(x + y + 6)"
      ]
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr.factor()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
348
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAANoAAAAYCAYAAACcPeNkAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAGaUlEQVR4Ae2c7ZHUOBCGvVsEAGwEQAZ8RABkwEcELBlA7b/9R0EGQAR3kAEQAbAZHBfBcZPB8j4et9B4JI9t2fKYcVdpJbWkVuuVWmrJA0eXl5dFVzo/P7+qNmdVu5tV/Ez8VVdZS/0FgT8FgSa7uNJzkK8l9Lm1Vfqt0t8VbhlviRcEDhCBqF0c9wTjVMb1wGv7Wumb4t32eEtyQeDQEIjaRV9D4zT7loqiDNPczlRRB9E+Ba+UtlOAOzd9K4yidtHL0ATCOwX/PkYHP8S7aDspqvtCdZcTsCVgA+CFxwHmk5P02Jp38a4q+Bvv3ujbFjDpH7WLXobmd1yB9ki8Oz6/Ka021D9R/LGp3lK2RmAIvCTjM9IUn+4Brl+kx6XC9yr8I5244/803cTfJ31Nrdax9GczcXaRZGgSxg7E/eyO0v4JF1VI9coXS8Uvo5WWAofAkHhJ1hsJfl7JdH1MkMCgWC8sRtYDG+7WGtojfaVee5LeW3bR99WxqIS9VPwQFao88Y8dKmGYvFJmIenDow1uyLssHQ7fydB4gT0y3atxV5UHwPRCMh637Hcf9G2pqrODLbvodaIJJCwWAN4qfZugNCeUO/qVjtET1c+56NkxCXOlQfGqsEdmCibZMJ2TvtI1ahd9TzT8acAmdqSOGndJleOz7jrxnLxDT4yIF3PwRCHnhpcynXPRN2oXztA0qRiOXZTvKf1MAQt9qgB9VZ3y8ULxtTWr81/czPKSG2rZRYdQ+zF4lU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TbBYyhNBMY8eLATcQk43iFOIvBkRfDA+FU9RSSf6i9ymk2UsvJjrXnfDter9/zJeBcMTQZxWbO43xDf84Ps0hb6DrsmjPv+VgY9A17TAZLE+VmwnQlcRneqrn94X904djVR5aLwkj02AjTTkvrUaRU5M56ZvDEBcx9yES5VzN2WXjO2Uucfep7+h8Sq/7/VRxGuTE9O56evB9DuZ/USja+1SPPHioja5Tb+1PPDUUHhJDqcZbu/W480+Qjw3fZswnOJEQx8uvRsX4iYll7LB8ALznN5E6tTNTd/oeCc50dCm2q14Iu/6ITk6mD+5IBUvtedlj1+jzMKLmJu+u9beLyVaXHuoS3odAAAAAElFTkSuQmCC\n",
Markus Holzer's avatar
Markus Holzer committed
349
350
351
352
353
354
355
      "text/latex": [
       "$\\displaystyle x^{2} \\left(x + \\cos{\\left(x \\right)} + 5\\right) + x^{2}$"
      ],
      "text/plain": [
       " 2                     2\n",
       "x ⋅(x + cos(x) + 5) + x "
      ]
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr.subs(y, sp.cos(x))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can also built equations and solve them"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
380
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAANAAAAAYCAYAAACLH3OtAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAF/ElEQVR4Ae2a7XHUMBCGj0wKIKQCoAMCFZB0wEcFQAdk8i//MtBBkgog6SBQAQkdQAcw6SC8jyNpfDpZtmRb52O8MzrJ+ny10u5qpXtwd3e3SKXj4+OHanNk2j0x8Tvl36b2NdefOWA5sIn7atuCT4w/abIfbBulT5W+UXhq8+Z45kAGBzZuX21lTJIm7yU0+7W2n5R+orxntbw5OXM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tN75FN+9daIIdSk7Ybxvk7yqsWRvGtq5iX4DgRWuSl3kbGsDRWhw+sr7PGpj48uhVOf4N06K5XledqDQ99slY2hAd+h9r4fYz6Pfaaqv+mE0hsXrETSKydK9vWwDCYvyfg7KFR0URsjvpRoHKmld+X6HPlPF4YQ+ocwFvnBe3X4v9oXP4rxnubTwh0kzVEuHz8fvvBv0uvqcYLWtDBJ+Z1uKVvmE/4aya9pK2UR5l1ppXsRWhIrsh9KonBH7vte2nzGX6Al+NUaeKBEU3rSN/cmEJNfmrlz95XKfo75TXNZQTPBlBl8UlsK6C5ON8z4YUW5IPClQILxcMWguWOc9TpQV/UFmvnU0kM/tht32h83nu4hfyjYG+6mjR+W3/Z5cLAxQYnBStELCQK77Hymo7XrOs6tPOU1zRpDcRbu2crGVHjC+WhWK96/Zk0CYWprIF5l+DPp1ij0UnjZDvtIXDqD0HaV9zkyIeaubyh8biOAwmNxfETZWiFPlArnlUSbxzJNEs5wpUmNmBJjYhmbtLO0blr86Dt3d+VlMZf5G3jJNowXpiNJ95tsBTrCb/7UEm8fXCupW1xC8QstRHxHzgqLvkXa+FAZFDhw1rid1RX4Iox5RyjQo58pKfyRcKI9QH70sNreST/94j4QOsgHF4249QXF0Hh3QVHnWMQG7K476Nxcwg/qaSlz8G48W3WYoHgmjYiGvKV4qQHzo3neIEJiKcI/KXiSVv4AqwYfYh/VfadsgdLceMAAAAASUVORK5CYII=\n",
Markus Holzer's avatar
Markus Holzer committed
381
382
383
384
385
386
387
      "text/latex": [
       "$\\displaystyle x^{2} \\left(x + y + 5\\right) + x^{2} = 1$"
      ],
      "text/plain": [
       " 2                2    \n",
       "x ⋅(x + y + 5) + x  = 1"
      ]
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "eq = sp.Eq(expr, 1)\n",
    "eq"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
406
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAH8AAAAzCAYAAAC+J9cEAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAEwElEQVR4Ae2d7VEUQRCGD8sAUDPADAAj4MhANAIgAyl+wT8LM0AiQMhAjQAkA8lAvAz0fZaZrblhl9u728+b7qpmZmd3Z7r7ne752ivWTk5O1kcFdHp6OikotqIBWkBYFmL8Qrr8Ev+N+GyAOprI5Ra4ivAF76s1ef5vZQ7VO36Uv2t3VskCwvpA+uy9XCWlVl0XgbYpHfHiLeWXHpYN/J73GIHMeH0hfhBvizfEtZCBX4sZm6vEefgeLSj/SQneXwsx4TNK1AIGfqLAo7aBb+AnbIGEVTfPN/ATtkDCqpvnG/gJWyBh1c3zDfyELTAs1d84cV/XIbZt79ZhxYbr0LYuhznQ+DEZXansXvnvSr+6srmTpMGX4eLvFi5Vdje3FRt+QTJle/t1N5Mk+DLmhgyJNx0pn33HoJRr+K04CUp1wgfIeHn4AQtHp4TSuUn1jMV8IDEoSs7zBdJ7IcSx6E6IlMp3w+s583QceFCUoucfCqGJwJ4MCqkGhG3c82VkPMKHxHfK74sZcz+KoRs9c/2YbeUvX8Pcq028Hxn+iBnnmUGHw4CKVpva8PwzGfULLFPeiPkkiTHySCkdI55xq6hR8uF5GxmcbEQDwGdISIYaBV/GxONDcAm1GNivTdmsCO/rsjmSPB74TeW9DL7Bb8pcBM/48pVNnw37zhA/pb03WhVD7Ok9v1a+VT6cQW+pgjuV0QlGSmeuX/UMbS8jA03FFMrk7/H7BTorw0Jh+Jcs57o3FseU7bjpPhEkJvStoue/+MU6rtX2Wlk9s8AHJABbiNSw7wT+/Q/KfPYXVVLVsZQMYRvUJaYo63zhvSDPfKSQ9G4RuCOVE802lDK0LUR6txSkhSqs8FKjYT9sX8rhMXhxPrlT2TocPtdCHq9+rs2iqNCCWO038aznLyOOA5XNFCZ8GByvwfNC4x7rmolfm0ToRq6YiHDIVxjy44dX4box8GUcPB1mRo2n8aODnFTGPWb/rZLavQZgMZ0y63hKkY8hiWXoYMjJfewE9sPVvsonVZRoEnw8iBk1II8kEL8H5BQKz2Ny9aB8PgTwTFukdnfFgI8sEBO2HV3Hc5TsZo//oEM+D3H6YNtK5xONgS9B6H25YBhQZYDdCeC0H5JkaXu4CZuvK38gPcLNKZbNlLGUndmRW5vw1aVtT+uho1cKtTXLj3PdLlpnY56/qEBDfE9e1skkUe3GG1V0BrauZ3o9djbPH2JvK5BZgHNWwX5D5X0ZA7/AkEMrEvDM9Bnv5/rdvoX9niEtINclUuVTUAc8y+nsewR3PVIa7qcUammeX2iWTgtZvlU6BXVAs1w9V54ZPqGfVczUnkqZNub5ZZbpoFzglZ2C+s0n9iPCU1DW9EQK0pxUz9QSO78RZQz8yCAdX851CiqQXy0jr4X9ZaxX87sCM16iseV8WXMzeXUGfm6KfmXUEcaSiJCe74iqrNZTUAv7PcEcYCVKq6eg5vk9AV9i4OkwB150hKkZu4sEtZ6CmufLyj2h1k9BDfyeIC/PnkiUqSWayho9BbWw3xPwuxDDwO/C6j1p08DvCRBdiOHHfD47ZoaZkxuD8mvLDNcCMbbSJMPaez6HA+E/XAj3j4ertUnuLcD+wRN8/wN7Ln/yKtUUoQAAAABJRU5ErkJggg==\n",
Markus Holzer's avatar
Markus Holzer committed
407
408
409
410
411
412
413
414
415
      "text/latex": [
       "$\\displaystyle \\left[ - x - 6 + \\frac{1}{x^{2}}\\right]$"
      ],
      "text/plain": [
       "⎡         1 ⎤\n",
       "⎢-x - 6 + ──⎥\n",
       "⎢          2⎥\n",
       "⎣         x ⎦"
      ]
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sp.solve(sp.Eq(expr, 1), y)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "A *sympy* expression is represented by an abstract syntax tree (AST), which can be inspected and modified."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
440
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAKoAAAAYCAYAAABqdGb8AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAFRElEQVRoBe2b63HUMBDHDyYFAKmA0AGPDpIOklBBoAMYvuVbBjoIVACkg4QK8ugAOoC5DsL/ZySNzpb8kGXd3eCd0UnW8+/d1e5KTh7c398vhtLp6ekjjflgxu2Z/ET1y6Fzzf1nDlgOtOnVju00MP+oSd/aMSqfq3yr9MzWzfnMgQQORPXqYcJkDHkj5dz3xn5UeU91z726uThzYCgHonqVqqhY05uhKOr9pdg2bKg3zc8jOLDFfI3qVZKiihGflfx4lAV+qe6uL3/V9536zha4L8NMP/GtwTPVPVLyNz3eDf5uFQlzVK9SY1THAE0O4w6VXrjKjoLG0H9X+aeOrnNzkwM/xDcOs9YoUIYc/9V+pfRcCVf6+V/zdv2CX4idXiVZVPvKmoxdTHz6QmXfwtoujVz9YOwH5e8bjXNFHw78USd4jSDh5YVSg//iL0bgreG3ittDwtzQq2SLaiZ7r/wAFphn8l8dLEGxuSUoQsLDoQ9XuBGWJQOeO81x1JN58Bl+uxuanuNctwx43Vx9CloPJW3oVZJFNZPBhHOVcTHsbiwku72LjtW/pNJgdUibQsXwGD7D7zHvXxIvShrUq1SLyp0pL0DuSAxp3blqJ+bosrhuvrmQhQPw+1ippHFIBR7VK6eoZte9MSu8Un6ihIa/NnXX6kM8tFD+2NQNzQgTrmKDhmCIzZGz3sPDh4xbPTthm7Yvyvu64WzQtCZywlDsKiGjM9XZw5UeVwh+w3eHfaV14gfDp9F65bt+vgp8Ign7tdIXpX0949JhCrHOWHqpCX62TFICQ8vyjSYOffDjUqn+/lgpPERpQhbfjKyQDYlNRCweIviNMq+Lssi0UlS9JBrvC2KpZ4Rgd+GTWrsekwgmB+PYghh6ARce4m42LIRFquNu9Q7VqAl+hOtACflUpDKuHasZO6CCey2KKmzZ9Mq6/hvzwtXL64c7OU6XFUOU53JvKLxjsl3M5KMwCCOCClkV1lyoPRQ/t52g/Q8YWM8z5vGItep1rnkCPG7uQAFlxftxu1E/A/CMgWilifCOkqkPuFJUgazHNyHB+OOyl8di0PiQIi5Uj2dAgIM+Lqi/3aQoJIK23oU5sbbUtcXbWfFoLdYlBHmi3F3uU+9RSCHbjIMbqjmnwJtNryrX79CqIMBWMNXBiTbV8YkuxAR/aJ8ybqhznokx9MHp98GbOO9iGuDRUjjrgvDHTVEmxg/xz3qNEB76w/e10liZ7hgF/K63IOjFQrCzEILvQnJ9SWLORrxUGIMgDCLw+rxg8FriU63Lt3AOT3Vi48SsO0pcx18fn/05t0yxqLwk6Y+ZfGX3qY42e6hQcRSx47n6qlNJDPW1u55XhGz4AV7ccGniA8vKoUnP7wyI2DmiOm+UBqr1ssp0RxOyE4m/mHihF+f78KUSDOECFgV2YQB9RtBXjcV616kkhvraXc9YMO5LuRX5rWT/ODxmwbrmS24XBg54eD6rrFhLDMtT1S0jEyPXYPwZ6Z+rOqtMH6T8K8qYNxFDudc7Uo51nZy0TtJhKgZM86Gw+8pjB5rY0Ko+N562xbQWYQtGx26utu7BtpJ4gwBMJa6/NCHokjscSxOzNq3vLiFhvdxnYpU5mHA3eNY6sL0xGU/7tMFWvAH8HkMl8UZxFreoIJHAie8IMVbivyjKNTUIH9afuLC62lJO2IL7DR1o1oQyvKwwYk3BzsFv64kYdR1E4I/QN52JKCT3lhxYcJ8IvnhsqnVTiDi2pOdKwdh7zFosKugkcHb8ofJBF/G93+w/7iiesrEulG+0xxoior/cLWUUiDm0fAAAAABJRU5ErkJggg==\n",
Markus Holzer's avatar
Markus Holzer committed
441
442
443
444
445
446
447
      "text/latex": [
       "$\\displaystyle x^{2} \\left(x + y + 5\\right) + x^{2}$"
      ],
      "text/plain": [
       " 2                2\n",
       "x ⋅(x + y + 5) + x "
      ]
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<!-- Generated by graphviz version 2.50.0 (0)\n",
       " -->\n",
       "<!-- Pages: 1 -->\n",
       "<svg width=\"425pt\" height=\"260pt\"\n",
       " viewBox=\"0.00 0.00 425.00 260.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 256)\">\n",
       "<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-256 421,-256 421,4 -4,4\"/>\n",
       "<!-- Add(Pow(Symbol(&#39;x&#39;), Integer(2)), Mul(Pow(Symbol(&#39;x&#39;), Integer(2)), Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;))))_() -->\n",
       "<g id=\"node1\" class=\"node\">\n",
       "<title>Add(Pow(Symbol(&#39;x&#39;), Integer(2)), Mul(Pow(Symbol(&#39;x&#39;), Integer(2)), Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;))))_()</title>\n",
       "<ellipse fill=\"none\" stroke=\"black\" cx=\"136\" cy=\"-234\" rx=\"28.7\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"136\" y=\"-230.3\" font-family=\"Times,serif\" font-size=\"14.00\">Add</text>\n",
       "</g>\n",
       "<!-- Pow(Symbol(&#39;x&#39;), Integer(2))_(0,) -->\n",
       "<g id=\"node2\" class=\"node\">\n",
       "<title>Pow(Symbol(&#39;x&#39;), Integer(2))_(0,)</title>\n",
       "<ellipse fill=\"none\" stroke=\"black\" cx=\"98\" cy=\"-162\" rx=\"29.8\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"98\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\">Pow</text>\n",
       "</g>\n",
       "<!-- Add(Pow(Symbol(&#39;x&#39;), Integer(2)), Mul(Pow(Symbol(&#39;x&#39;), Integer(2)), Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;))))_()&#45;&gt;Pow(Symbol(&#39;x&#39;), Integer(2))_(0,) -->\n",
       "<g id=\"edge1\" class=\"edge\">\n",
       "<title>Add(Pow(Symbol(&#39;x&#39;), Integer(2)), Mul(Pow(Symbol(&#39;x&#39;), Integer(2)), Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;))))_()&#45;&gt;Pow(Symbol(&#39;x&#39;), Integer(2))_(0,)</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M127.19,-216.76C122.65,-208.4 117.01,-198.02 111.9,-188.61\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"114.88,-186.75 107.03,-179.63 108.72,-190.09 114.88,-186.75\"/>\n",
       "</g>\n",
       "<!-- Mul(Pow(Symbol(&#39;x&#39;), Integer(2)), Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;)))_(1,) -->\n",
       "<g id=\"node5\" class=\"node\">\n",
       "<title>Mul(Pow(Symbol(&#39;x&#39;), Integer(2)), Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;)))_(1,)</title>\n",
       "<ellipse fill=\"none\" stroke=\"black\" cx=\"174\" cy=\"-162\" rx=\"28.7\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"174\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\">Mul</text>\n",
       "</g>\n",
       "<!-- Add(Pow(Symbol(&#39;x&#39;), Integer(2)), Mul(Pow(Symbol(&#39;x&#39;), Integer(2)), Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;))))_()&#45;&gt;Mul(Pow(Symbol(&#39;x&#39;), Integer(2)), Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;)))_(1,) -->\n",
       "<g id=\"edge2\" class=\"edge\">\n",
       "<title>Add(Pow(Symbol(&#39;x&#39;), Integer(2)), Mul(Pow(Symbol(&#39;x&#39;), Integer(2)), Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;))))_()&#45;&gt;Mul(Pow(Symbol(&#39;x&#39;), Integer(2)), Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;)))_(1,)</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M144.81,-216.76C149.42,-208.28 155.16,-197.71 160.32,-188.2\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"163.54,-189.61 165.23,-179.15 157.39,-186.27 163.54,-189.61\"/>\n",
       "</g>\n",
       "<!-- Symbol(&#39;x&#39;)_(0, 0) -->\n",
       "<g id=\"node3\" class=\"node\">\n",
       "<title>Symbol(&#39;x&#39;)_(0, 0)</title>\n",
       "<ellipse fill=\"none\" stroke=\"black\" cx=\"27\" cy=\"-90\" rx=\"27\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"27\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\">x</text>\n",
       "</g>\n",
       "<!-- Pow(Symbol(&#39;x&#39;), Integer(2))_(0,)&#45;&gt;Symbol(&#39;x&#39;)_(0, 0) -->\n",
       "<g id=\"edge3\" class=\"edge\">\n",
       "<title>Pow(Symbol(&#39;x&#39;), Integer(2))_(0,)&#45;&gt;Symbol(&#39;x&#39;)_(0, 0)</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M82.94,-146.15C73.02,-136.37 59.87,-123.4 48.81,-112.5\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"51.13,-109.87 41.55,-105.35 46.21,-114.86 51.13,-109.87\"/>\n",
       "</g>\n",
       "<!-- Integer(2)_(0, 1) -->\n",
       "<g id=\"node4\" class=\"node\">\n",
       "<title>Integer(2)_(0, 1)</title>\n",
       "<ellipse fill=\"none\" stroke=\"black\" cx=\"99\" cy=\"-90\" rx=\"27\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"99\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\">2</text>\n",
       "</g>\n",
       "<!-- Pow(Symbol(&#39;x&#39;), Integer(2))_(0,)&#45;&gt;Integer(2)_(0, 1) -->\n",
       "<g id=\"edge4\" class=\"edge\">\n",
       "<title>Pow(Symbol(&#39;x&#39;), Integer(2))_(0,)&#45;&gt;Integer(2)_(0, 1)</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M98.25,-143.7C98.36,-135.98 98.49,-126.71 98.61,-118.11\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"102.11,-118.15 98.76,-108.1 95.11,-118.05 102.11,-118.15\"/>\n",
       "</g>\n",
       "<!-- Pow(Symbol(&#39;x&#39;), Integer(2))_(1, 0) -->\n",
       "<g id=\"node6\" class=\"node\">\n",
       "<title>Pow(Symbol(&#39;x&#39;), Integer(2))_(1, 0)</title>\n",
       "<ellipse fill=\"none\" stroke=\"black\" cx=\"174\" cy=\"-90\" rx=\"29.8\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"174\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\">Pow</text>\n",
       "</g>\n",
       "<!-- Mul(Pow(Symbol(&#39;x&#39;), Integer(2)), Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;)))_(1,)&#45;&gt;Pow(Symbol(&#39;x&#39;), Integer(2))_(1, 0) -->\n",
       "<g id=\"edge5\" class=\"edge\">\n",
       "<title>Mul(Pow(Symbol(&#39;x&#39;), Integer(2)), Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;)))_(1,)&#45;&gt;Pow(Symbol(&#39;x&#39;), Integer(2))_(1, 0)</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M174,-143.7C174,-135.98 174,-126.71 174,-118.11\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"177.5,-118.1 174,-108.1 170.5,-118.1 177.5,-118.1\"/>\n",
       "</g>\n",
       "<!-- Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;))_(1, 1) -->\n",
       "<g id=\"node9\" class=\"node\">\n",
       "<title>Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;))_(1, 1)</title>\n",
       "<ellipse fill=\"none\" stroke=\"black\" cx=\"284\" cy=\"-90\" rx=\"28.7\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"284\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\">Add</text>\n",
       "</g>\n",
       "<!-- Mul(Pow(Symbol(&#39;x&#39;), Integer(2)), Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;)))_(1,)&#45;&gt;Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;))_(1, 1) -->\n",
       "<g id=\"edge6\" class=\"edge\">\n",
       "<title>Mul(Pow(Symbol(&#39;x&#39;), Integer(2)), Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;)))_(1,)&#45;&gt;Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;))_(1, 1)</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M193.41,-148.65C210.74,-137.62 236.33,-121.33 255.9,-108.88\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"257.85,-111.79 264.41,-103.47 254.1,-105.88 257.85,-111.79\"/>\n",
       "</g>\n",
       "<!-- Symbol(&#39;x&#39;)_(1, 0, 0) -->\n",
       "<g id=\"node7\" class=\"node\">\n",
       "<title>Symbol(&#39;x&#39;)_(1, 0, 0)</title>\n",
       "<ellipse fill=\"none\" stroke=\"black\" cx=\"102\" cy=\"-18\" rx=\"27\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"102\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">x</text>\n",
       "</g>\n",
       "<!-- Pow(Symbol(&#39;x&#39;), Integer(2))_(1, 0)&#45;&gt;Symbol(&#39;x&#39;)_(1, 0, 0) -->\n",
       "<g id=\"edge7\" class=\"edge\">\n",
       "<title>Pow(Symbol(&#39;x&#39;), Integer(2))_(1, 0)&#45;&gt;Symbol(&#39;x&#39;)_(1, 0, 0)</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M158.73,-74.15C148.67,-64.37 135.33,-51.4 124.11,-40.5\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"126.36,-37.81 116.75,-33.35 121.49,-42.83 126.36,-37.81\"/>\n",
       "</g>\n",
       "<!-- Integer(2)_(1, 0, 1) -->\n",
       "<g id=\"node8\" class=\"node\">\n",
       "<title>Integer(2)_(1, 0, 1)</title>\n",
       "<ellipse fill=\"none\" stroke=\"black\" cx=\"174\" cy=\"-18\" rx=\"27\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"174\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">2</text>\n",
       "</g>\n",
       "<!-- Pow(Symbol(&#39;x&#39;), Integer(2))_(1, 0)&#45;&gt;Integer(2)_(1, 0, 1) -->\n",
       "<g id=\"edge8\" class=\"edge\">\n",
       "<title>Pow(Symbol(&#39;x&#39;), Integer(2))_(1, 0)&#45;&gt;Integer(2)_(1, 0, 1)</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M174,-71.7C174,-63.98 174,-54.71 174,-46.11\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"177.5,-46.1 174,-36.1 170.5,-46.1 177.5,-46.1\"/>\n",
       "</g>\n",
       "<!-- Integer(5)_(1, 1, 0) -->\n",
       "<g id=\"node10\" class=\"node\">\n",
       "<title>Integer(5)_(1, 1, 0)</title>\n",
       "<ellipse fill=\"none\" stroke=\"black\" cx=\"246\" cy=\"-18\" rx=\"27\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"246\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">5</text>\n",
       "</g>\n",
       "<!-- Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;))_(1, 1)&#45;&gt;Integer(5)_(1, 1, 0) -->\n",
       "<g id=\"edge9\" class=\"edge\">\n",
       "<title>Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;))_(1, 1)&#45;&gt;Integer(5)_(1, 1, 0)</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M275.19,-72.76C270.58,-64.28 264.84,-53.71 259.68,-44.2\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"262.61,-42.27 254.77,-35.15 256.46,-45.61 262.61,-42.27\"/>\n",
       "</g>\n",
       "<!-- Symbol(&#39;x&#39;)_(1, 1, 1) -->\n",
       "<g id=\"node11\" class=\"node\">\n",
       "<title>Symbol(&#39;x&#39;)_(1, 1, 1)</title>\n",
       "<ellipse fill=\"none\" stroke=\"black\" cx=\"318\" cy=\"-18\" rx=\"27\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"318\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">x</text>\n",
       "</g>\n",
       "<!-- Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;))_(1, 1)&#45;&gt;Symbol(&#39;x&#39;)_(1, 1, 1) -->\n",
       "<g id=\"edge10\" class=\"edge\">\n",
       "<title>Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;))_(1, 1)&#45;&gt;Symbol(&#39;x&#39;)_(1, 1, 1)</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M292.06,-72.41C296.08,-64.13 301.04,-53.92 305.54,-44.66\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"308.78,-45.99 310,-35.47 302.48,-42.94 308.78,-45.99\"/>\n",
       "</g>\n",
       "<!-- Symbol(&#39;y&#39;)_(1, 1, 2) -->\n",
       "<g id=\"node12\" class=\"node\">\n",
       "<title>Symbol(&#39;y&#39;)_(1, 1, 2)</title>\n",
       "<ellipse fill=\"none\" stroke=\"black\" cx=\"390\" cy=\"-18\" rx=\"27\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"390\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">y</text>\n",
       "</g>\n",
       "<!-- Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;))_(1, 1)&#45;&gt;Symbol(&#39;y&#39;)_(1, 1, 2) -->\n",
       "<g id=\"edge11\" class=\"edge\">\n",
       "<title>Add(Integer(5), Symbol(&#39;x&#39;), Symbol(&#39;y&#39;))_(1, 1)&#45;&gt;Symbol(&#39;y&#39;)_(1, 1, 2)</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M302.95,-76.49C319.71,-65.42 344.35,-49.15 363.14,-36.74\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"365.15,-39.6 371.57,-31.17 361.29,-33.76 365.15,-39.6\"/>\n",
       "</g>\n",
       "</g>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<graphviz.sources.Source at 0x7fc1288673a0>"
      ]
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ps.to_dot(expr, graph_style={'size': \"9.5,12.5\"} )"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Programatically the children node type is acessible as ``expr.func`` and its children as ``expr.args``.\n",
    "With these members a tree can be traversed and modified."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
645
646
647
      "text/plain": [
       "sympy.core.add.Add"
      ]
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr.func"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
665
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAALAAAAAaCAYAAAAXMNbWAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAGkElEQVR4Ae2b7XHVOhCGDxkKOIQKbm4HAToIHQRuBYQOwvAr+ZcJHRAq4KMDoAJIOggd3HA6CO+jSELWkWU7tmVncnZGyJJWu6/Xq9VKJzy4vr5eDEnHx8dLyXtrZe7Y+pX6V0Pq6SJrjpi64N/w1lvgYTykj32gvl+qv8VjLdunmvva8er5vZ7PVf51fRPUc8Q0gRnurkr8KPQr9yZb7oFaDPuqnqi+rfMi5kDz93iwdKp6R327rmOCeo6YJjDDnVZJEPoav4F3YA2arV+1j54xc8s283+25C3F1huT7OLSoVKY742eNrYVzy8Z5LPqw9Aw3oEZVGG770VScKYS5rs4DynJRS/BPSb3xaT5GG3KHaTH2087VbZbs5v6liphQGCHrjhmCrV4ztT/mvlu3OTA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5w7xq+uClUiMIk/KyVFKKJc8dGoQyb1MeYODuFQ9tnK+q26clecnfR3cBRMf8X7J6IDV4YpKoUhpbupr/Lx7TcCL9t5aeLHrMphTe1DC6Lu7GTOWA1AWaQE0tVDPfChiGqUOJKySsilMMBC4/xWTfQDFM6HY/t0Ap42pDkox9B1enNiRsGUUPhRfZ8T/XSVwlCjPtvNNRX3vdwM/a/iImBdxMsK6zPINwaHinNiIidB8B/1xb7mVOFryXzcMajGyW/eh/9SdHR09Ftlj+eSRTr3VZYldXbRJWyXKrtd5vTltTY57CvHzZe8U5Vz1+5aD40np1+6dlQuczyM8T4qBzyTA0OfVMiTStOzzEosjSWljyjWFA1S8/r0EZnqolNWro12Pi1Te6kJ3OOfZCfmB2+NJy82Ocrukf1Nwb7Trvjw2QUpBESI/66CgCJkgbDFzZaEkUMIKVPqvnIU3NLVZ6vnCs5t1+DjF1PeoXOax2SoJ54bIS3+lR7yWuzcFDC4xv0iPrPITQRWgzyYPyrGAKXoQPo63XWWAhbp4bAROkU0PKsmAYjzxaEKmDlEFQtKPS0B3ibnRQXv49/pAXkEpBdlu+Gv5+sunQ3fffxHNiE68EfUd2HB3blPJLtyM0FUrdygxC+icfNHQeF38A4MswaIwOSl3sNjIZv2xgJTWEA+SRBhR6mc1UwK4QBpkFzpUrW5NnP9m3pjgRlYgKC6dnf8B+NFxn0ejbbTAAAAAElFTkSuQmCC\n",
Markus Holzer's avatar
Markus Holzer committed
666
667
668
669
670
671
672
      "text/latex": [
       "$\\displaystyle \\left( x^{2}, \\  x^{2} \\left(x + y + 5\\right)\\right)$"
      ],
      "text/plain": [
       "⎛ 2   2            ⎞\n",
       "⎝x , x ⋅(x + y + 5)⎠"
      ]
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr.args"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Using *pystencils* \n",
    "\n",
    "\n",
    "### Fields\n",
    "\n",
    "*pystencils* is a module to generate code for stencil operations. \n",
    "One has to specify an update rule for each element of an array, with optional dependencies to neighbors.\n",
    "This is done use pure *sympy* with one addition: **Fields**.\n",
    "\n",
    "Fields represent a multidimensional array, where some dimensions are considered *spatial*, and some as *index* dimensions. Spatial coordinates are given relative (i.e. one can specify \"the current cell\" and \"the left neighbor\") whereas index dimensions are used to index multiple values per cell."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "my_field = ps.fields(\"f(3) : double[2D]\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Neighbors are labeled according to points on a compass where the first coordinate is west/east, second coordinate north/south and third coordinate top/bottom. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
722
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAACkAAAAdCAYAAAA3i0VNAAAACXBIWXMAAA7EAAAOxAGVKw4bAAACxklEQVRYCdWX7VEbMRCGwUMBHtKB00E+OrA7cOggoQOY/LL/MdAB6YCBDgwVJEMHcQd46MB5HvlOnGXd4bPHmOzMWqvV7urVrqSTD+fz+UFbGo/HXXxO4FPkz23929oftXUA1Cd8+oWfYHdOm4B8BNUjYIc7R1dM0HmribaZ578A2VhuSnpNBp6LLFzQL+VtEtPatzaTALok2jF8A/+Ay8OC+LZUCxIYAhOgQP/A9/BeKFtusmjWvF7uixLvDaBZyYJEP4CnuT2IrsfYKexCevTdFk+0V7Q7ocPqF4eJLLEABTCDvRNn6AW1PxJkyqPRaA6fpfp99VcODlmznNJe9+ECwuJ3BSRqv80HgLXU74JyIL+CbNqEjgUMKxlvMt1ojNhnVcfc6TaTtVkkgIfLkx8Xgux11erpho+3gvQEf6B/Hnr8IF/B13A4sLlMfsHud+lQbXESzIA27ldkFyVwx+RXCR/tvbbOYa+uCe0kcbxFFxayBBJlD0MnqsukTn7PI+Hjs82JYmbjYL1gnOpClfvF/MELudR1l0AyWh6aGCB4vPwYqG7sxapBKoCYiHRRz+jC/BX3ADQF6UV+VzGKYhHcQNuSAHM0Q3mcDLjtBh0m96TeFoPux5vEsOy6FQy0KxJgugCT0jOT7o8uQIMBbTaTRQCdtqW6GM6fboGQlBKkJ0uw3xoQGCAspMHm1SGSYByBWpmU0gOrzfQIp1+pZa6Pnac4FzhnHnX4uLCftPEepH8B+4gJoBhTvqNNM+l8f5deQSgaiSBm3P/aMRiygcqnm6fT6yg+3RhX9wB/R45bCdnKSV7mH2HvTDMciX6Yb+UF1PTS4WXUhy+bbOrG8BvWjeX02HfhiWOdCHsNgZV5b3nIWpUde8vZ9n4107WfxUa4TKijJW9ziHzBL5WyaRJs/Wz6WVxsq1yq19FZjnXsNrFJY/8DzKtH71g9xXgAAAAASUVORK5CYII=\n",
Markus Holzer's avatar
Markus Holzer committed
723
724
725
726
727
728
      "text/latex": [
       "$\\displaystyle {f}_{(1,0)}^{1}$"
      ],
      "text/plain": [
       "f_E__1"
      ]
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "field_access = my_field[1, 0](1)\n",
    "field_access"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The result of indexing a field is an instance of ``Field.Access``. This class is a subclass of a *sympy* Symbol and thus can be used whereever normal symbols can be used. It is just like a normal symbol with some additional information attached to it."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
754
755
756
      "text/plain": [
       "True"
      ]
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "isinstance(field_access, sp.Symbol)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Building our first stencil kernel\n",
    "\n",
    "Lets start by building a simple filter kernel. We create a field representing an image, then define a edge detection filter on the third pixel component which is blue for an RGB image."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
Martin Bauer's avatar
Martin Bauer committed
782
    "img_field = ps.fields(\"img(4): [2D]\")"
783
784
785
786
787
788
789
790
791
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
792
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAxwAAAArCAYAAADykI6AAAAACXBIWXMAAA7EAAAOxAGVKw4bAAASZ0lEQVR4Ae2d4bXctBaFb7JSQIAKIB0QqIDQATwquKGDZOUX/GNBB0kqeIQOAhVA0gGvA8LtIG9/HsuxPfKMJFsz9tyttTSS5aOjo32OZZ2RZd95//79lYMRMAJGwAgYASNgBIyAETACRqAUgR9//PG+6j5r63/Wptcqv7lXytT1jIARMAJGwAgYASNgBIyAETACLQI/y7n4PqCh/HPl3yg+uBsKnRoBI2AEjIARMAJGwAgYASNgBAoReCwn41Gv7s/Kf6ayz+1w9FBx1ggYASNgBIyAETACRsAIGIEiBFjd+CtW8473cMRgcZkRMAJGwAgYASNgBIyAETACpQhoZYMVjm+UPji4h0MEPHv1WulvpY25nhEwAkbACBgBI2AEjIARMALbQEDzfjZ//6H4lfI3JVKr3ueq943iQ+pPPlIlQpyNj5Xa2QApByNgBIyAETACRsAIGAEjcOEItE7Gtbr5Rnmcj6ygOryhitWNhy2vq+gjVTr5WETfK228kqxWTGwEjIARMAJGwAgYASNgBIzAphFo/YGvlX6b2hHR4mw8Vdq8rao93nc4dIIlEJZRPlW+aBklVSjTGQEjYASMgBEwAk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oIdL6EMN3Z6a59r0sBZ5JMcTxdl+wR0UOg7yqng/73OlL8bnfGwEjIARMAJGwAgYASNgBIzAZSMgP4AtC/gED5Wf9ZTP4JGqHmxfKc83MLL2RvTqO2sEjIARMAJGwAgYASNgBIzABhGQD8BWhdeK13OdDbofdTjEmP0NvP6KfQs5eyPg6WAEjIARMAJGwAgYASNgBIzAdhHgcxl8LqJ4o3i/61GHAwI1wNIJ36PwKgeAOBgBI2AEjIARMAJGwAgYgQtHoF1swNlYbGvF/wGor/xOC8qk9AAAAABJRU5ErkJggg==\n",
Markus Holzer's avatar
Markus Holzer committed
793
794
795
796
797
798
799
      "text/latex": [
       "$\\displaystyle \\left({img}_{(1,0)}^{2} w_{2} - {img}_{(1,1)}^{2} w_{1} - {img}_{(-1,1)}^{2} w_{1} + {img}_{(1,-1)}^{2} w_{1} - {img}_{(-1,-1)}^{2} w_{1} - {img}_{(-1,0)}^{2} w_{2}\\right)^{2}$"
      ],
      "text/plain": [
       "                                                                                       2\n",
       "(img_E__2⋅w₂ - img_NE__2⋅w₁ - img_NW__2⋅w₁ + img_SE__2⋅w₁ - img_SW__2⋅w₁ - img_W__2⋅w₂) "
      ]
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "w1, w2 = sp.symbols(\"w_1 w_2\")\n",
    "color = 2\n",
    "sobel_x = (-w2 * img_field[-1,0](color) - w1 * img_field[-1,-1](color) - w1 * img_field[-1, +1](color) \\\n",
    "           +w2 * img_field[+1,0](color) + w1 * img_field[+1,-1](color) - w1 * img_field[+1, +1](color))**2\n",
    "sobel_x"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We have mixed some standard *sympy* symbols into this expression to possibly give the different directions different weights. The complete expression is still a valid *sympy* expression, so all features of *sympy* work on it. Lets for example now fix one weight by substituting it with a constant."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
828
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyUAAAArCAYAAABmdidyAAAACXBIWXMAAA7EAAAOxAGVKw4bAAATX0lEQVR4Ae2d77XctBbFh6wUEEIFkA4SXgWEDuBRwQ0dhJVP8C0LOkhSAYQOAhVA6IDXAeF2cN/++Vq+Ho/skTT22B5vreWRLOvP0T577HMsy/7o5uZm52AEjIARMAJGwAgYASNgBIyAEZgSgR9++OGB2n9R9/FZHV8p//r+lB27bSNgBIyAETACRsAIGAEjYASMQI3Aj3JAvg1oKP1K6ffaHt0LmY6NgBEwAkbACBgBI2AEjIARMAITIvBMjsjTVvs/Kv2Z8h7bKWmh4qQRMAJGwAgYASNgBIyAETACkyHALMmfsdY/8pqSGCzOMwJGwAgYASNgBIyAETACRmBKBDRDwkzJV4ofDa4pUQGe83qn+NcpBXLbRsAIGAEjYASMgBEwAkbACKwHAfkHLFr/XdsXSl/nSq46j1XnK21PqNv7+JYK4pA8VGyHBKQcjIARMAJGwAgYASNgBIyAEagQqB2RK+28VxoHJTmoPG/eYpbkSd3OLvr4lg4+U6FvFVeeS3IPLmgEjIARMAJGwAgYASNgBIzAZhCo/YYvFX+dMmiVwyH5TnH1Fq56/9Ap0QGmUpiK+VTp7KmYFGFcxggYASNgBIyAETACRsAIGIHLQEA+wzuN5JXiwSesdByHhKexvmuNHOfku9jjW2904LUdkhZUThoBI2AEjIARMAJGwAgYASPQhwCzJG/kPxx7jItvkvBKYOKw8Zrg673Ht5TBYpO32j62UyIUHIyAETACRsAIGAEjYASMgBE4ioB8h7AePekxrm6D3bdvseDkpzU4JJIRT+xFPSCmggjVZ+pvk/41AukImE/pWK29pHW9dg1OL785Mj3Ga+7B/Fiz9vJkt67z8FJp/Ii/hRsfQ/xfbu3GKVFl1pJg3L/MbWSm8r2fqZ9JHne7bgTMp3XrL0d66zoHrW2WNUe2qffUUZ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5lPq7BH1cwhim1HFoe2k4LUkeyfJc20n+w0cA3Q3yvHg38SvFr7vHvG8EjIARMAJGwAgYASNgBIyAEQAB+Qsso8B3eKJ08VNFe49v0XAdvlDMN0Ky1mqEyo6NgBEwAkbACBgBI2AEjIARuGwE5CuwfOKdtqtTHBJQijolapT1FrzSi3UUOWs1aNPBCBgBI2AEjIARMAJGwAgYgctHgE+K8EmNosXtbXiiTgkF1DjTL3yvw7MlAOJgBIyAETACRsAIGAEjYASMQIVAPXGBQzLKco//A3J+3F913zEPAAAAAElFTkSuQmCC\n",
Markus Holzer's avatar
Markus Holzer committed
829
830
831
832
833
834
835
      "text/latex": [
       "$\\displaystyle \\left({img}_{(1,0)}^{2} w_{2} - 0.5 {img}_{(1,1)}^{2} - 0.5 {img}_{(-1,1)}^{2} + 0.5 {img}_{(1,-1)}^{2} - 0.5 {img}_{(-1,-1)}^{2} - {img}_{(-1,0)}^{2} w_{2}\\right)^{2}$"
      ],
      "text/plain": [
       "                                                                                           2\n",
       "(img_E__2⋅w₂ - 0.5⋅img_NE__2 - 0.5⋅img_NW__2 + 0.5⋅img_SE__2 - 0.5⋅img_SW__2 - img_W__2⋅w₂) "
      ]
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sobel_x = sobel_x.subs(w1, 0.5)\n",
    "sobel_x"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now lets built an executable kernel out of it, which writes the result to a second field. Assignments are created using *pystencils* `Assignment` class, that gets the left- and right hand side of the assignment."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
861
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA4gAAAArCAYAAAA60KYTAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAXl0lEQVR4Ae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OlMt3qCEjHtqfVtXAdAQp1XSKc55sS1CrgKbSRSfouGabk8ndSCXAz8xTaR4kUtqkS1GbkqVXXlc0FPNr16CLYS5a+zXOd7XpaGmZ77Kut4S2Zs7cMTx3bkm1PlcX0V7sPbE89W21u0f5qu79rk+cWdT51TLXppDZ5puJ5a/S3oI9bGMM17Ko2nGqRR3J8p+Pi2OE9lOhULwL6RYL/PnmufOrW2noHZcmMgBEwAkbACBgBI2AEjIARmA0BxQq8SIm44TOdX7TTrootprMhc5sNfalh8R+EKN3JCBgBI2AEjIARMAJGwAgYASPQIKA4gce7Xuh4dGlwSKMOEEGh4iQl83wer6rlubspz/ZVPCqLZgSMgBEwAkbACBgBI2AEjMBMCPAXefxFXPGLadpyOEBso1HpefwlgP8D9CpipTqyWEbACBgBI2AEjIARMAJG4NoIxAUkgsPZHkf7P42116uckG7vAAAAAElFTkSuQmCC\n",
Markus Holzer's avatar
Markus Holzer committed
862
863
864
865
866
867
868
      "text/latex": [
       "$\\displaystyle {dst}_{(0,0)} \\leftarrow \\left({img}_{(1,0)}^{2} w_{2} - 0.5 {img}_{(1,1)}^{2} - 0.5 {img}_{(-1,1)}^{2} + 0.5 {img}_{(1,-1)}^{2} - 0.5 {img}_{(-1,-1)}^{2} - {img}_{(-1,0)}^{2} w_{2}\\right)^{2}$"
      ],
      "text/plain": [
       "                                                                                                    2\n",
       "dst_C := (img_E__2⋅w₂ - 0.5⋅img_NE__2 - 0.5⋅img_NW__2 + 0.5⋅img_SE__2 - 0.5⋅img_SW__2 - img_W__2⋅w₂) "
      ]
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dst_field = ps.fields('dst: [2D]' )\n",
    "update_rule = ps.Assignment(dst_field[0,0], sobel_x)\n",
    "update_rule"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Next we can see *pystencils* in action which creates a kernel for us."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pystencils import create_kernel\n",
    "ast = create_kernel(update_rule, cpu_openmp=False)\n",
    "compiled_kernel = ast.compile()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This compiled kernel is now just an ordinary Python function. \n",
    "Now lets grab an image to apply this filter to:"
   ]
  },
  {
   "cell_type": "code",
Jan Hönig's avatar
Jan Hönig committed
909
   "execution_count": 30,
910
911
912
   "metadata": {},
   "outputs": [
    {
Markus Holzer's avatar
Markus Holzer committed
913
914
915
916
917
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "No requests installed\n"
     ]
918
919
920
    }
   ],
   "source": [
921
922
923
924
    "try:\n",
    "    import requests\n",
    "    import imageio\n",
    "    from io import BytesIO\n",
925
    "\n",
Markus Holzer's avatar
Markus Holzer committed
926
    "    response = requests.get(\"https://www.python.org/static/community_logos/python-logo-master-v3-TM.png\")\n",
927
928
929
930
931
    "    img = imageio.imread(BytesIO(response.content)).astype(np.double)\n",
    "    img /= img.max()\n",
    "    plt.imshow(img);\n",
    "except ImportError:\n",
    "    print(\"No requests installed\")\n",
932
    "    img = np.random.random((82, 290, 4))"
933
934
935
936
   ]
  },
  {
   "cell_type": "code",
Jan Hönig's avatar
Jan Hönig committed
937
   "execution_count": 31,
938
939
940
941
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
942
943
944
945
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAACBCAYAAADZoOE3AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAADbXUlEQVR4nOz9eXCk+XUdCp4v933fkYl9L6CA2ru6NrLZC6kmaZO0RD3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jAw8MAOjf+++rD9L1/IJjfOCuJ//LKjGzK7uyK7vu05VVYmZXdmVXdt2nKxvAsyu7siu77tOVDeDZlV3ZlV336coG8OzKruzKrvt0ZQN4dmVXdmXXfbqyATy7siu7sus+XdkAnl3ZlV3ZdZ+ubADPruzKruy6T9f/D+DE3acK1FRVAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
946
     },
Martin Bauer's avatar
Martin Bauer committed
947
948
949
     "metadata": {
      "needs_background": "light"
     },
950
951
952
953
     "output_type": "display_data"
    }
   ],
   "source": [
Michael Kuron's avatar
Michael Kuron committed
954
955
956
957
    "filtered_image = np.zeros_like(img[..., 0])\n",
    "# here we call the compiled stencil function\n",
    "compiled_kernel(img=img, dst=filtered_image, w_2=0.5)\n",
    "plt.imshow(filtered_image, cmap='gray');"
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Digging into *pystencils*\n",
    "\n",
    "On our way we have created an ``ast``-object. We can inspect this, to see what *pystencils* actually does."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<!-- Generated by graphviz version 2.50.0 (0)\n",
       " -->\n",
       "<!-- Pages: 1 -->\n",
       "<svg width=\"684pt\" height=\"391pt\"\n",
       " viewBox=\"0.00 0.00 684.00 390.75\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(0.82 0.82) rotate(0) translate(4 472)\">\n",
       "<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-472 829.23,-472 829.23,4 -4,4\"/>\n",
       "<!-- 140467585313440 -->\n",
       "<g id=\"node1\" class=\"node\">\n",
       "<title>140467585313440</title>\n",
       "<ellipse fill=\"#a056db\" stroke=\"black\" cx=\"263.84\" cy=\"-450\" rx=\"134.58\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"263.84\" y=\"-446.3\" font-family=\"Times,serif\" font-size=\"14.00\">Func: kernel (dst,img,w_2)</text>\n",
       "</g>\n",
       "<!-- 140467585884144 -->\n",
       "<g id=\"node11\" class=\"node\">\n",
       "<title>140467585884144</title>\n",
       "<ellipse fill=\"#dbc256\" stroke=\"black\" cx=\"263.84\" cy=\"-378\" rx=\"36.29\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"263.84\" y=\"-374.3\" font-family=\"Times,serif\" font-size=\"14.00\">Block</text>\n",
       "</g>\n",
       "<!-- 140467585313440&#45;&gt;140467585884144 -->\n",
       "<g id=\"edge10\" class=\"edge\">\n",
       "<title>140467585313440&#45;&gt;140467585884144</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M263.84,-431.7C263.84,-423.98 263.84,-414.71 263.84,-406.11\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"267.34,-406.1 263.84,-396.1 260.34,-406.1 267.34,-406.1\"/>\n",
       "</g>\n",
       "<!-- 140467585881120 -->\n",
       "<g id=\"node2\" class=\"node\">\n",
       "<title>140467585881120</title>\n",
       "<ellipse fill=\"#56db7f\" stroke=\"black\" cx=\"175.84\" cy=\"-306\" rx=\"73.39\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"175.84\" y=\"-302.3\" font-family=\"Times,serif\" font-size=\"14.00\">_data_img_22</text>\n",
       "</g>\n",
       "<!-- 140467585885152 -->\n",
       "<g id=\"node3\" class=\"node\">\n",
       "<title>140467585885152</title>\n",
       "<ellipse fill=\"#3498db\" stroke=\"black\" cx=\"352.84\" cy=\"-306\" rx=\"85.59\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"352.84\" y=\"-302.3\" font-family=\"Times,serif\" font-size=\"14.00\">Loop over dim 0</text>\n",
       "</g>\n",
       "<!-- 140467585885824 -->\n",
       "<g id=\"node10\" class=\"node\">\n",
       "<title>140467585885824</title>\n",
       "<ellipse fill=\"#dbc256\" stroke=\"black\" cx=\"352.84\" cy=\"-234\" rx=\"36.29\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"352.84\" y=\"-230.3\" font-family=\"Times,serif\" font-size=\"14.00\">Block</text>\n",
       "</g>\n",
       "<!-- 140467585885152&#45;&gt;140467585885824 -->\n",
       "<g id=\"edge7\" class=\"edge\">\n",
       "<title>140467585885152&#45;&gt;140467585885824</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M352.84,-287.7C352.84,-279.98 352.84,-270.71 352.84,-262.11\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"356.34,-262.1 352.84,-252.1 349.34,-262.1 356.34,-262.1\"/>\n",
       "</g>\n",
       "<!-- 140467585883424 -->\n",
       "<g id=\"node4\" class=\"node\">\n",
       "<title>140467585883424</title>\n",
       "<ellipse fill=\"#56db7f\" stroke=\"black\" cx=\"70.84\" cy=\"-162\" rx=\"70.69\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"70.84\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\">_data_dst_00</text>\n",
       "</g>\n",
       "<!-- 140467585879392 -->\n",
       "<g id=\"node5\" class=\"node\">\n",
       "<title>140467585879392</title>\n",
       "<ellipse fill=\"#56db7f\" stroke=\"black\" cx=\"249.84\" cy=\"-162\" rx=\"89.88\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"249.84\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\">_data_img_22_01</text>\n",
       "</g>\n",
       "<!-- 140467585317616 -->\n",
       "<g id=\"node6\" class=\"node\">\n",
       "<title>140467585317616</title>\n",
       "<ellipse fill=\"#56db7f\" stroke=\"black\" cx=\"455.84\" cy=\"-162\" rx=\"98.58\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"455.84\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\">_data_img_22_0m1</text>\n",
       "</g>\n",
       "<!-- 140467585884528 -->\n",
       "<g id=\"node7\" class=\"node\">\n",
       "<title>140467585884528</title>\n",
       "<ellipse fill=\"#3498db\" stroke=\"black\" cx=\"658.84\" cy=\"-162\" rx=\"85.59\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"658.84\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\">Loop over dim 1</text>\n",
       "</g>\n",
       "<!-- 140467585304800 -->\n",
       "<g id=\"node9\" class=\"node\">\n",
       "<title>140467585304800</title>\n",
       "<ellipse fill=\"#dbc256\" stroke=\"black\" cx=\"658.84\" cy=\"-90\" rx=\"36.29\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"658.84\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\">Block</text>\n",
       "</g>\n",
       "<!-- 140467585884528&#45;&gt;140467585304800 -->\n",
       "<g id=\"edge2\" class=\"edge\">\n",
       "<title>140467585884528&#45;&gt;140467585304800</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M658.84,-143.7C658.84,-135.98 658.84,-126.71 658.84,-118.11\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"662.34,-118.1 658.84,-108.1 655.34,-118.1 662.34,-118.1\"/>\n",
       "</g>\n",
       "<!-- 140467585316992 -->\n",
       "<g id=\"node8\" class=\"node\">\n",
       "<title>140467585316992</title>\n",
       "<ellipse fill=\"#56db7f\" stroke=\"black\" cx=\"658.84\" cy=\"-18\" rx=\"166.27\" ry=\"18\"/>\n",
       "<text text-anchor=\"middle\" x=\"658.84\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">_data_dst_00[_stride_dst_1*ctr_1]</text>\n",
       "</g>\n",
       "<!-- 140467585304800&#45;&gt;140467585316992 -->\n",
       "<g id=\"edge1\" class=\"edge\">\n",
       "<title>140467585304800&#45;&gt;140467585316992</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M658.84,-71.7C658.84,-63.98 658.84,-54.71 658.84,-46.11\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"662.34,-46.1 658.84,-36.1 655.34,-46.1 662.34,-46.1\"/>\n",
       "</g>\n",
       "<!-- 140467585885824&#45;&gt;140467585883424 -->\n",
       "<g id=\"edge3\" class=\"edge\">\n",
       "<title>140467585885824&#45;&gt;140467585883424</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M321.04,-225.11C274.68,-213.6 187.72,-192.01 129.54,-177.57\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"130.29,-174.15 119.74,-175.14 128.61,-180.94 130.29,-174.15\"/>\n",
       "</g>\n",
       "<!-- 140467585885824&#45;&gt;140467585879392 -->\n",
       "<g id=\"edge4\" class=\"edge\">\n",
       "<title>140467585885824&#45;&gt;140467585879392</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M332,-218.83C317.82,-209.19 298.75,-196.24 282.56,-185.23\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"284.15,-182.08 273.91,-179.35 280.21,-187.87 284.15,-182.08\"/>\n",
       "</g>\n",
       "<!-- 140467585885824&#45;&gt;140467585317616 -->\n",
       "<g id=\"edge5\" class=\"edge\">\n",
       "<title>140467585885824&#45;&gt;140467585317616</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M373.69,-218.83C387.77,-209.26 406.67,-196.42 422.79,-185.46\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"425.11,-188.12 431.41,-179.61 421.17,-182.33 425.11,-188.12\"/>\n",
       "</g>\n",
       "<!-- 140467585885824&#45;&gt;140467585884528 -->\n",
       "<g id=\"edge6\" class=\"edge\">\n",
       "<title>140467585885824&#45;&gt;140467585884528</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M385.3,-225.58C434.58,-214.3 529.28,-192.64 593.27,-178\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"594.3,-181.35 603.27,-175.71 592.74,-174.53 594.3,-181.35\"/>\n",
       "</g>\n",
       "<!-- 140467585884144&#45;&gt;140467585881120 -->\n",
       "<g id=\"edge8\" class=\"edge\">\n",
       "<title>140467585884144&#45;&gt;140467585881120</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M245.18,-362.15C233.32,-352.72 217.72,-340.31 204.33,-329.66\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"206.33,-326.78 196.32,-323.29 201.97,-332.25 206.33,-326.78\"/>\n",
       "</g>\n",
       "<!-- 140467585884144&#45;&gt;140467585885152 -->\n",
       "<g id=\"edge9\" class=\"edge\">\n",
       "<title>140467585884144&#45;&gt;140467585885152</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M282.72,-362.15C294.63,-352.78 310.27,-340.49 323.75,-329.88\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"326.12,-332.47 331.82,-323.54 321.79,-326.97 326.12,-332.47\"/>\n",
       "</g>\n",
       "</g>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<graphviz.sources.Source at 0x7fc1285aff40>"
      ]
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ps.to_dot(ast, graph_style={'size': \"9.5,12.5\"})"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "*pystencils* also builds a tree structure of the program, where each `Assignment` node internally again has a *sympy* AST which is not printed here. Out of this representation *C* code can be generated:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
      "text/html": [
       "<style>pre { line-height: 125%; }\n",
       "td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }\n",
       "span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }\n",
       "td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }\n",
       "span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }\n",
       ".highlight .hll { background-color: #ffffcc }\n",
       ".highlight { background: #f8f8f8; }\n",
       ".highlight .c { color: #3D7B7B; font-style: italic } /* Comment */\n",
       ".highlight .err { border: 1px solid #FF0000 } /* Error */\n",
       ".highlight .k { color: #008000; font-weight: bold } /* Keyword */\n",
       ".highlight .o { color: #666666 } /* Operator */\n",
       ".highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */\n",
       ".highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */\n",
       ".highlight .cp { color: #9C6500 } /* Comment.Preproc */\n",
       ".highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */\n",
       ".highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */\n",
       ".highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */\n",
       ".highlight .gd { color: #A00000 } /* Generic.Deleted */\n",
       ".highlight .ge { font-style: italic } /* Generic.Emph */\n",
       ".highlight .gr { color: #E40000 } /* Generic.Error */\n",
       ".highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */\n",
       ".highlight .gi { color: #008400 } /* Generic.Inserted */\n",
       ".highlight .go { color: #717171 } /* Generic.Output */\n",
       ".highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */\n",
       ".highlight .gs { font-weight: bold } /* Generic.Strong */\n",
       ".highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */\n",
       ".highlight .gt { color: #0044DD } /* Generic.Traceback */\n",
       ".highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */\n",
       ".highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */\n",
       ".highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */\n",
       ".highlight .kp { color: #008000 } /* Keyword.Pseudo */\n",
       ".highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */\n",
       ".highlight .kt { color: #B00040 } /* Keyword.Type */\n",
       ".highlight .m { color: #666666 } /* Literal.Number */\n",
       ".highlight .s { color: #BA2121 } /* Literal.String */\n",
       ".highlight .na { color: #687822 } /* Name.Attribute */\n",
       ".highlight .nb { color: #008000 } /* Name.Builtin */\n",
       ".highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */\n",
       ".highlight .no { color: #880000 } /* Name.Constant */\n",
       ".highlight .nd { color: #AA22FF } /* Name.Decorator */\n",
       ".highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */\n",
       ".highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */\n",
       ".highlight .nf { color: #0000FF } /* Name.Function */\n",
       ".highlight .nl { color: #767600 } /* Name.Label */\n",
       ".highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */\n",
       ".highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */\n",
       ".highlight .nv { color: #19177C } /* Name.Variable */\n",
       ".highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */\n",
       ".highlight .w { color: #bbbbbb } /* Text.Whitespace */\n",
       ".highlight .mb { color: #666666 } /* Literal.Number.Bin */\n",
       ".highlight .mf { color: #666666 } /* Literal.Number.Float */\n",
       ".highlight .mh { color: #666666 } /* Literal.Number.Hex */\n",
       ".highlight .mi { color: #666666 } /* Literal.Number.Integer */\n",
       ".highlight .mo { color: #666666 } /* Literal.Number.Oct */\n",
       ".highlight .sa { color: #BA2121 } /* Literal.String.Affix */\n",
       ".highlight .sb { color: #BA2121 } /* Literal.String.Backtick */\n",
       ".highlight .sc { color: #BA2121 } /* Literal.String.Char */\n",
       ".highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */\n",
       ".highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */\n",
       ".highlight .s2 { color: #BA2121 } /* Literal.String.Double */\n",
       ".highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */\n",
       ".highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */\n",
       ".highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */\n",
       ".highlight .sx { color: #008000 } /* Literal.String.Other */\n",
       ".highlight .sr { color: #A45A77 } /* Literal.String.Regex */\n",
       ".highlight .s1 { color: #BA2121 } /* Literal.String.Single */\n",
       ".highlight .ss { color: #19177C } /* Literal.String.Symbol */\n",
       ".highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */\n",
       ".highlight .fm { color: #0000FF } /* Name.Function.Magic */\n",
       ".highlight .vc { color: #19177C } /* Name.Variable.Class */\n",
       ".highlight .vg { color: #19177C } /* Name.Variable.Global */\n",
       ".highlight .vi { color: #19177C } /* Name.Variable.Instance */\n",
       ".highlight .vm { color: #19177C } /* Name.Variable.Magic */\n",
       ".highlight .il { color: #666666 } /* Literal.Number.Integer.Long */</style>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
1222
1223
1224
1225
1226
1227
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
      "text/html": [
       "<div class=\"highlight\"><pre><span></span><span class=\"n\">FUNC_PREFIX</span><span class=\"w\"> </span><span class=\"kt\">void</span><span class=\"w\"> </span><span class=\"n\">kernel</span><span class=\"p\">(</span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\">  </span><span class=\"n\">_data_dst</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\"> </span><span class=\"k\">const</span><span class=\"w\"> </span><span class=\"n\">_data_img</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"k\">const</span><span class=\"w\"> </span><span class=\"n\">_size_dst_0</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"k\">const</span><span class=\"w\"> </span><span class=\"n\">_size_dst_1</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"k\">const</span><span class=\"w\"> </span><span class=\"n\">_stride_dst_0</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"k\">const</span><span class=\"w\"> </span><span class=\"n\">_stride_dst_1</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"k\">const</span><span class=\"w\"> </span><span class=\"n\">_stride_img_0</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"k\">const</span><span class=\"w\"> </span><span class=\"n\">_stride_img_1</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"k\">const</span><span class=\"w\"> </span><span class=\"n\">_stride_img_2</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"n\">w_2</span><span class=\"p\">)</span><span class=\"w\"></span>\n",
       "<span class=\"p\">{</span><span class=\"w\"></span>\n",
       "<span class=\"w\">   </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\"> </span><span class=\"n\">_data_img_22</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"n\">_data_img</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mi\">2</span><span class=\"o\">*</span><span class=\"n\">_stride_img_2</span><span class=\"p\">;</span><span class=\"w\"></span>\n",
       "<span class=\"w\">   </span><span class=\"k\">for</span><span class=\"w\"> </span><span class=\"p\">(</span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">;</span><span class=\"w\"> </span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">&lt;</span><span class=\"w\"> </span><span class=\"n\">_size_dst_0</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">;</span><span class=\"w\"> </span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">+=</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">)</span><span class=\"w\"></span>\n",
       "<span class=\"w\">   </span><span class=\"p\">{</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\">  </span><span class=\"n\">_data_dst_00</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"n\">_data_dst</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"n\">_stride_dst_0</span><span class=\"o\">*</span><span class=\"n\">ctr_0</span><span class=\"p\">;</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\"> </span><span class=\"n\">_data_img_22_01</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"n\">_stride_img_0</span><span class=\"o\">*</span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"n\">_stride_img_0</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"n\">_data_img_22</span><span class=\"p\">;</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\"> </span><span class=\"n\">_data_img_22_0m1</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"n\">_stride_img_0</span><span class=\"o\">*</span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"n\">_stride_img_0</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"n\">_data_img_22</span><span class=\"p\">;</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"k\">for</span><span class=\"w\"> </span><span class=\"p\">(</span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">;</span><span class=\"w\"> </span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">&lt;</span><span class=\"w\"> </span><span class=\"n\">_size_dst_1</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">;</span><span class=\"w\"> </span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">+=</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">)</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"p\">{</span><span class=\"w\"></span>\n",
       "<span class=\"w\">         </span><span class=\"n\">_data_dst_00</span><span class=\"p\">[</span><span class=\"n\">_stride_dst_1</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"n\">pow</span><span class=\"p\">(</span><span class=\"n\">w_2</span><span class=\"o\">*</span><span class=\"mf\">-1.0</span><span class=\"o\">*</span><span class=\"n\">_data_img_22_0m1</span><span class=\"p\">[</span><span class=\"n\">_stride_img_1</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"n\">w_2</span><span class=\"o\">*</span><span class=\"n\">_data_img_22_01</span><span class=\"p\">[</span><span class=\"n\">_stride_img_1</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mf\">0.5</span><span class=\"o\">*</span><span class=\"n\">_data_img_22_01</span><span class=\"p\">[</span><span class=\"n\">_stride_img_1</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"n\">_stride_img_1</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mf\">0.5</span><span class=\"o\">*</span><span class=\"n\">_data_img_22_0m1</span><span class=\"p\">[</span><span class=\"n\">_stride_img_1</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"n\">_stride_img_1</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mf\">0.5</span><span class=\"o\">*</span><span class=\"n\">_data_img_22_0m1</span><span class=\"p\">[</span><span class=\"n\">_stride_img_1</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"n\">_stride_img_1</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mf\">0.5</span><span class=\"o\">*</span><span class=\"n\">_data_img_22_01</span><span class=\"p\">[</span><span class=\"n\">_stride_img_1</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"n\">_stride_img_1</span><span class=\"p\">],</span><span class=\"w\"> </span><span class=\"mi\">2</span><span class=\"p\">);</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"p\">}</span><span class=\"w\"></span>\n",
       "<span class=\"w\">   </span><span class=\"p\">}</span><span class=\"w\"></span>\n",
       "<span class=\"p\">}</span><span class=\"w\"></span>\n",
       "</pre></div>\n"
      ],
      "text/plain": [
       "FUNC_PREFIX void kernel(double * RESTRICT  _data_dst, double * RESTRICT const _data_img, int64_t const _size_dst_0, int64_t const _size_dst_1, int64_t const _stride_dst_0, int64_t const _stride_dst_1, int64_t const _stride_img_0, int64_t const _stride_img_1, int64_t const _stride_img_2, double w_2)\n",
       "{\n",
       "   double * RESTRICT _data_img_22 = _data_img + 2*_stride_img_2;\n",
       "   for (int64_t ctr_0 = 1; ctr_0 < _size_dst_0 - 1; ctr_0 += 1)\n",
       "   {\n",
       "      double * RESTRICT  _data_dst_00 = _data_dst + _stride_dst_0*ctr_0;\n",
       "      double * RESTRICT _data_img_22_01 = _stride_img_0*ctr_0 + _stride_img_0 + _data_img_22;\n",
       "      double * RESTRICT _data_img_22_0m1 = _stride_img_0*ctr_0 - _stride_img_0 + _data_img_22;\n",
       "      for (int64_t ctr_1 = 1; ctr_1 < _size_dst_1 - 1; ctr_1 += 1)\n",
       "      {\n",
       "         _data_dst_00[_stride_dst_1*ctr_1] = pow(w_2*-1.0*_data_img_22_0m1[_stride_img_1*ctr_1] + w_2*_data_img_22_01[_stride_img_1*ctr_1] - 0.5*_data_img_22_01[_stride_img_1*ctr_1 + _stride_img_1] - 0.5*_data_img_22_0m1[_stride_img_1*ctr_1 + _stride_img_1] - 0.5*_data_img_22_0m1[_stride_img_1*ctr_1 - _stride_img_1] + 0.5*_data_img_22_01[_stride_img_1*ctr_1 - _stride_img_1], 2);\n",
       "      }\n",
       "   }\n",
       "}"
      ]
1261
1262
     },
     "metadata": {},
Markus Holzer's avatar
Markus Holzer committed
1263
     "output_type": "display_data"
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
    }
   ],
   "source": [
    "ps.show_code(ast)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Behind the scenes this code is compiled into a shared library and made available as a Python function. Before compiling this function we can modify the AST object, for example to parallelize it with OpenMP."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
      "text/html": [
       "<style>pre { line-height: 125%; }\n",
       "td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }\n",
       "span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }\n",
       "td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }\n",
       "span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }\n",
       ".highlight .hll { background-color: #ffffcc }\n",
       ".highlight { background: #f8f8f8; }\n",
       ".highlight .c { color: #3D7B7B; font-style: italic } /* Comment */\n",
       ".highlight .err { border: 1px solid #FF0000 } /* Error */\n",
       ".highlight .k { color: #008000; font-weight: bold } /* Keyword */\n",
       ".highlight .o { color: #666666 } /* Operator */\n",
       ".highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */\n",
       ".highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */\n",
       ".highlight .cp { color: #9C6500 } /* Comment.Preproc */\n",
       ".highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */\n",
       ".highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */\n",
       ".highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */\n",
       ".highlight .gd { color: #A00000 } /* Generic.Deleted */\n",
       ".highlight .ge { font-style: italic } /* Generic.Emph */\n",
       ".highlight .gr { color: #E40000 } /* Generic.Error */\n",
       ".highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */\n",
       ".highlight .gi { color: #008400 } /* Generic.Inserted */\n",
       ".highlight .go { color: #717171 } /* Generic.Output */\n",
       ".highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */\n",
       ".highlight .gs { font-weight: bold } /* Generic.Strong */\n",
       ".highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */\n",
       ".highlight .gt { color: #0044DD } /* Generic.Traceback */\n",
       ".highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */\n",
       ".highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */\n",
       ".highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */\n",
       ".highlight .kp { color: #008000 } /* Keyword.Pseudo */\n",
       ".highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */\n",
       ".highlight .kt { color: #B00040 } /* Keyword.Type */\n",
       ".highlight .m { color: #666666 } /* Literal.Number */\n",
       ".highlight .s { color: #BA2121 } /* Literal.String */\n",
       ".highlight .na { color: #687822 } /* Name.Attribute */\n",
       ".highlight .nb { color: #008000 } /* Name.Builtin */\n",
       ".highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */\n",
       ".highlight .no { color: #880000 } /* Name.Constant */\n",
       ".highlight .nd { color: #AA22FF } /* Name.Decorator */\n",
       ".highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */\n",
       ".highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */\n",
       ".highlight .nf { color: #0000FF } /* Name.Function */\n",
       ".highlight .nl { color: #767600 } /* Name.Label */\n",
       ".highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */\n",
       ".highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */\n",
       ".highlight .nv { color: #19177C } /* Name.Variable */\n",
       ".highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */\n",
       ".highlight .w { color: #bbbbbb } /* Text.Whitespace */\n",
       ".highlight .mb { color: #666666 } /* Literal.Number.Bin */\n",
       ".highlight .mf { color: #666666 } /* Literal.Number.Float */\n",
       ".highlight .mh { color: #666666 } /* Literal.Number.Hex */\n",
       ".highlight .mi { color: #666666 } /* Literal.Number.Integer */\n",
       ".highlight .mo { color: #666666 } /* Literal.Number.Oct */\n",
       ".highlight .sa { color: #BA2121 } /* Literal.String.Affix */\n",
       ".highlight .sb { color: #BA2121 } /* Literal.String.Backtick */\n",
       ".highlight .sc { color: #BA2121 } /* Literal.String.Char */\n",
       ".highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */\n",
       ".highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */\n",
       ".highlight .s2 { color: #BA2121 } /* Literal.String.Double */\n",
       ".highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */\n",
       ".highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */\n",
       ".highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */\n",
       ".highlight .sx { color: #008000 } /* Literal.String.Other */\n",
       ".highlight .sr { color: #A45A77 } /* Literal.String.Regex */\n",
       ".highlight .s1 { color: #BA2121 } /* Literal.String.Single */\n",
       ".highlight .ss { color: #19177C } /* Literal.String.Symbol */\n",
       ".highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */\n",
       ".highlight .fm { color: #0000FF } /* Name.Function.Magic */\n",
       ".highlight .vc { color: #19177C } /* Name.Variable.Class */\n",
       ".highlight .vg { color: #19177C } /* Name.Variable.Global */\n",
       ".highlight .vi { color: #19177C } /* Name.Variable.Instance */\n",
       ".highlight .vm { color: #19177C } /* Name.Variable.Magic */\n",
       ".highlight .il { color: #666666 } /* Literal.Number.Integer.Long */</style>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
1363
1364
1365
1366
1367
1368
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
      "text/html": [
       "<div class=\"highlight\"><pre><span></span><span class=\"n\">FUNC_PREFIX</span><span class=\"w\"> </span><span class=\"kt\">void</span><span class=\"w\"> </span><span class=\"n\">kernel</span><span class=\"p\">(</span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\">  </span><span class=\"n\">_data_dst</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\"> </span><span class=\"k\">const</span><span class=\"w\"> </span><span class=\"n\">_data_img</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"k\">const</span><span class=\"w\"> </span><span class=\"n\">_size_dst_0</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"k\">const</span><span class=\"w\"> </span><span class=\"n\">_size_dst_1</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"k\">const</span><span class=\"w\"> </span><span class=\"n\">_stride_dst_0</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"k\">const</span><span class=\"w\"> </span><span class=\"n\">_stride_dst_1</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"k\">const</span><span class=\"w\"> </span><span class=\"n\">_stride_img_0</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"k\">const</span><span class=\"w\"> </span><span class=\"n\">_stride_img_1</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"k\">const</span><span class=\"w\"> </span><span class=\"n\">_stride_img_2</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"n\">w_2</span><span class=\"p\">)</span><span class=\"w\"></span>\n",
       "<span class=\"p\">{</span><span class=\"w\"></span>\n",
       "<span class=\"w\">   </span><span class=\"cp\">#pragma omp parallel num_threads(2)</span>\n",
       "<span class=\"w\">   </span><span class=\"p\">{</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\"> </span><span class=\"n\">_data_img_22</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"n\">_data_img</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mi\">2</span><span class=\"o\">*</span><span class=\"n\">_stride_img_2</span><span class=\"p\">;</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"cp\">#pragma omp for schedule(static)</span>\n",
       "<span class=\"w\">      </span><span class=\"k\">for</span><span class=\"w\"> </span><span class=\"p\">(</span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">;</span><span class=\"w\"> </span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">&lt;</span><span class=\"w\"> </span><span class=\"n\">_size_dst_0</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">;</span><span class=\"w\"> </span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">+=</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">)</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"p\">{</span><span class=\"w\"></span>\n",
       "<span class=\"w\">         </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\">  </span><span class=\"n\">_data_dst_00</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"n\">_data_dst</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"n\">_stride_dst_0</span><span class=\"o\">*</span><span class=\"n\">ctr_0</span><span class=\"p\">;</span><span class=\"w\"></span>\n",
       "<span class=\"w\">         </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\"> </span><span class=\"n\">_data_img_22_01</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"n\">_stride_img_0</span><span class=\"o\">*</span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"n\">_stride_img_0</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"n\">_data_img_22</span><span class=\"p\">;</span><span class=\"w\"></span>\n",
       "<span class=\"w\">         </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\"> </span><span class=\"n\">_data_img_22_0m1</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"n\">_stride_img_0</span><span class=\"o\">*</span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"n\">_stride_img_0</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"n\">_data_img_22</span><span class=\"p\">;</span><span class=\"w\"></span>\n",
       "<span class=\"w\">         </span><span class=\"k\">for</span><span class=\"w\"> </span><span class=\"p\">(</span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">;</span><span class=\"w\"> </span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">&lt;</span><span class=\"w\"> </span><span class=\"n\">_size_dst_1</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">;</span><span class=\"w\"> </span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">+=</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">)</span><span class=\"w\"></span>\n",
       "<span class=\"w\">         </span><span class=\"p\">{</span><span class=\"w\"></span>\n",
       "<span class=\"w\">            </span><span class=\"n\">_data_dst_00</span><span class=\"p\">[</span><span class=\"n\">_stride_dst_1</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"n\">pow</span><span class=\"p\">(</span><span class=\"n\">w_2</span><span class=\"o\">*</span><span class=\"mf\">-1.0</span><span class=\"o\">*</span><span class=\"n\">_data_img_22_0m1</span><span class=\"p\">[</span><span class=\"n\">_stride_img_1</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"n\">w_2</span><span class=\"o\">*</span><span class=\"n\">_data_img_22_01</span><span class=\"p\">[</span><span class=\"n\">_stride_img_1</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mf\">0.5</span><span class=\"o\">*</span><span class=\"n\">_data_img_22_01</span><span class=\"p\">[</span><span class=\"n\">_stride_img_1</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"n\">_stride_img_1</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mf\">0.5</span><span class=\"o\">*</span><span class=\"n\">_data_img_22_0m1</span><span class=\"p\">[</span><span class=\"n\">_stride_img_1</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"n\">_stride_img_1</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mf\">0.5</span><span class=\"o\">*</span><span class=\"n\">_data_img_22_0m1</span><span class=\"p\">[</span><span class=\"n\">_stride_img_1</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"n\">_stride_img_1</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mf\">0.5</span><span class=\"o\">*</span><span class=\"n\">_data_img_22_01</span><span class=\"p\">[</span><span class=\"n\">_stride_img_1</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"n\">_stride_img_1</span><span class=\"p\">],</span><span class=\"w\"> </span><span class=\"mi\">2</span><span class=\"p\">);</span><span class=\"w\"></span>\n",
       "<span class=\"w\">         </span><span class=\"p\">}</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"p\">}</span><span class=\"w\"></span>\n",
       "<span class=\"w\">   </span><span class=\"p\">}</span><span class=\"w\"></span>\n",
       "<span class=\"p\">}</span><span class=\"w\"></span>\n",
       "</pre></div>\n"
      ],
      "text/plain": [
       "FUNC_PREFIX void kernel(double * RESTRICT  _data_dst, double * RESTRICT const _data_img, int64_t const _size_dst_0, int64_t const _size_dst_1, int64_t const _stride_dst_0, int64_t const _stride_dst_1, int64_t const _stride_img_0, int64_t const _stride_img_1, int64_t const _stride_img_2, double w_2)\n",
       "{\n",
       "   #pragma omp parallel num_threads(2)\n",
       "   {\n",
       "      double * RESTRICT _data_img_22 = _data_img + 2*_stride_img_2;\n",
       "      #pragma omp for schedule(static)\n",
       "      for (int64_t ctr_0 = 1; ctr_0 < _size_dst_0 - 1; ctr_0 += 1)\n",
       "      {\n",
       "         double * RESTRICT  _data_dst_00 = _data_dst + _stride_dst_0*ctr_0;\n",
       "         double * RESTRICT _data_img_22_01 = _stride_img_0*ctr_0 + _stride_img_0 + _data_img_22;\n",
       "         double * RESTRICT _data_img_22_0m1 = _stride_img_0*ctr_0 - _stride_img_0 + _data_img_22;\n",
       "         for (int64_t ctr_1 = 1; ctr_1 < _size_dst_1 - 1; ctr_1 += 1)\n",
       "         {\n",
       "            _data_dst_00[_stride_dst_1*ctr_1] = pow(w_2*-1.0*_data_img_22_0m1[_stride_img_1*ctr_1] + w_2*_data_img_22_01[_stride_img_1*ctr_1] - 0.5*_data_img_22_01[_stride_img_1*ctr_1 + _stride_img_1] - 0.5*_data_img_22_0m1[_stride_img_1*ctr_1 + _stride_img_1] - 0.5*_data_img_22_0m1[_stride_img_1*ctr_1 - _stride_img_1] + 0.5*_data_img_22_01[_stride_img_1*ctr_1 - _stride_img_1], 2);\n",
       "         }\n",
       "      }\n",
       "   }\n",
       "}"
      ]
1410
1411
     },
     "metadata": {},
Markus Holzer's avatar
Markus Holzer committed
1412
     "output_type": "display_data"
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
    }
   ],
   "source": [
    "ast = ps.create_kernel(update_rule)\n",
    "ps.cpu.add_openmp(ast, num_threads=2)\n",
    "ps.show_code(ast)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
1428
1429
1430
      "text/plain": [
       "False"
      ]
1431
1432
1433
1434
1435
1436
1437
1438
1439
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "loops = list(ast.atoms(ps.astnodes.LoopOverCoordinate))\n",
    "l1 = loops[0]\n",
Markus Holzer's avatar
Markus Holzer committed
1440
    "l1.prefix_lines.append(\"#pragma something\")\n",
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
    "l1.is_outermost_loop"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Fixed array sizes\n",
    "\n",
    "Since we already know the arrays to which the kernel should be applied, we can \n",
    "create *Field* objects with fixed size, based on a numpy array:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
      "text/html": [
       "<style>pre { line-height: 125%; }\n",
       "td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }\n",
       "span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }\n",
       "td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }\n",
       "span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }\n",
       ".highlight .hll { background-color: #ffffcc }\n",
       ".highlight { background: #f8f8f8; }\n",
       ".highlight .c { color: #3D7B7B; font-style: italic } /* Comment */\n",
       ".highlight .err { border: 1px solid #FF0000 } /* Error */\n",
       ".highlight .k { color: #008000; font-weight: bold } /* Keyword */\n",
       ".highlight .o { color: #666666 } /* Operator */\n",
       ".highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */\n",
       ".highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */\n",
       ".highlight .cp { color: #9C6500 } /* Comment.Preproc */\n",
       ".highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */\n",
       ".highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */\n",
       ".highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */\n",
       ".highlight .gd { color: #A00000 } /* Generic.Deleted */\n",
       ".highlight .ge { font-style: italic } /* Generic.Emph */\n",
       ".highlight .gr { color: #E40000 } /* Generic.Error */\n",
       ".highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */\n",
       ".highlight .gi { color: #008400 } /* Generic.Inserted */\n",
       ".highlight .go { color: #717171 } /* Generic.Output */\n",
       ".highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */\n",
       ".highlight .gs { font-weight: bold } /* Generic.Strong */\n",
       ".highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */\n",
       ".highlight .gt { color: #0044DD } /* Generic.Traceback */\n",
       ".highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */\n",
       ".highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */\n",
       ".highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */\n",
       ".highlight .kp { color: #008000 } /* Keyword.Pseudo */\n",
       ".highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */\n",
       ".highlight .kt { color: #B00040 } /* Keyword.Type */\n",
       ".highlight .m { color: #666666 } /* Literal.Number */\n",
       ".highlight .s { color: #BA2121 } /* Literal.String */\n",
       ".highlight .na { color: #687822 } /* Name.Attribute */\n",
       ".highlight .nb { color: #008000 } /* Name.Builtin */\n",
       ".highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */\n",
       ".highlight .no { color: #880000 } /* Name.Constant */\n",
       ".highlight .nd { color: #AA22FF } /* Name.Decorator */\n",
       ".highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */\n",
       ".highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */\n",
       ".highlight .nf { color: #0000FF } /* Name.Function */\n",
       ".highlight .nl { color: #767600 } /* Name.Label */\n",
       ".highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */\n",
       ".highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */\n",
       ".highlight .nv { color: #19177C } /* Name.Variable */\n",
       ".highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */\n",
       ".highlight .w { color: #bbbbbb } /* Text.Whitespace */\n",
       ".highlight .mb { color: #666666 } /* Literal.Number.Bin */\n",
       ".highlight .mf { color: #666666 } /* Literal.Number.Float */\n",
       ".highlight .mh { color: #666666 } /* Literal.Number.Hex */\n",
       ".highlight .mi { color: #666666 } /* Literal.Number.Integer */\n",
       ".highlight .mo { color: #666666 } /* Literal.Number.Oct */\n",
       ".highlight .sa { color: #BA2121 } /* Literal.String.Affix */\n",
       ".highlight .sb { color: #BA2121 } /* Literal.String.Backtick */\n",
       ".highlight .sc { color: #BA2121 } /* Literal.String.Char */\n",
       ".highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */\n",
       ".highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */\n",
       ".highlight .s2 { color: #BA2121 } /* Literal.String.Double */\n",
       ".highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */\n",
       ".highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */\n",
       ".highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */\n",
       ".highlight .sx { color: #008000 } /* Literal.String.Other */\n",
       ".highlight .sr { color: #A45A77 } /* Literal.String.Regex */\n",
       ".highlight .s1 { color: #BA2121 } /* Literal.String.Single */\n",
       ".highlight .ss { color: #19177C } /* Literal.String.Symbol */\n",
       ".highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */\n",
       ".highlight .fm { color: #0000FF } /* Name.Function.Magic */\n",
       ".highlight .vc { color: #19177C } /* Name.Variable.Class */\n",
       ".highlight .vg { color: #19177C } /* Name.Variable.Global */\n",
       ".highlight .vi { color: #19177C } /* Name.Variable.Instance */\n",
       ".highlight .vm { color: #19177C } /* Name.Variable.Magic */\n",
       ".highlight .il { color: #666666 } /* Literal.Number.Integer.Long */</style>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
1540
1541
1542
1543
1544
1545
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
      "text/html": [
       "<div class=\"highlight\"><pre><span></span><span class=\"n\">FUNC_PREFIX</span><span class=\"w\"> </span><span class=\"kt\">void</span><span class=\"w\"> </span><span class=\"n\">kernel</span><span class=\"p\">(</span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\"> </span><span class=\"k\">const</span><span class=\"w\"> </span><span class=\"n\">_data_I</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\">  </span><span class=\"n\">_data_dst</span><span class=\"p\">)</span><span class=\"w\"></span>\n",
       "<span class=\"p\">{</span><span class=\"w\"></span>\n",
       "<span class=\"w\">   </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\"> </span><span class=\"n\">_data_I_21</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"n\">_data_I</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">;</span><span class=\"w\"></span>\n",
       "<span class=\"w\">   </span><span class=\"k\">for</span><span class=\"w\"> </span><span class=\"p\">(</span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">;</span><span class=\"w\"> </span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">&lt;</span><span class=\"w\"> </span><span class=\"mi\">81</span><span class=\"p\">;</span><span class=\"w\"> </span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">+=</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">)</span><span class=\"w\"></span>\n",
       "<span class=\"w\">   </span><span class=\"p\">{</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\">  </span><span class=\"n\">_data_dst_00</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"n\">_data_dst</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mi\">290</span><span class=\"o\">*</span><span class=\"n\">ctr_0</span><span class=\"p\">;</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\"> </span><span class=\"n\">_data_I_21_01</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"n\">_data_I_21</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mi\">1160</span><span class=\"o\">*</span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mi\">1160</span><span class=\"p\">;</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\"> </span><span class=\"n\">_data_I_21_0m1</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"n\">_data_I_21</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mi\">1160</span><span class=\"o\">*</span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mi\">1160</span><span class=\"p\">;</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"k\">for</span><span class=\"w\"> </span><span class=\"p\">(</span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">;</span><span class=\"w\"> </span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">&lt;</span><span class=\"w\"> </span><span class=\"mi\">289</span><span class=\"p\">;</span><span class=\"w\"> </span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">+=</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">)</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"p\">{</span><span class=\"w\"></span>\n",
       "<span class=\"w\">         </span><span class=\"n\">_data_dst_00</span><span class=\"p\">[</span><span class=\"n\">ctr_1</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"mf\">-1.0</span><span class=\"o\">*</span><span class=\"n\">_data_I_21_01</span><span class=\"p\">[</span><span class=\"mi\">4</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mi\">4</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mf\">1.0</span><span class=\"o\">*</span><span class=\"n\">_data_I_21_0m1</span><span class=\"p\">[</span><span class=\"mi\">4</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mi\">4</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mf\">1.0</span><span class=\"o\">*</span><span class=\"n\">_data_I_21_0m1</span><span class=\"p\">[</span><span class=\"mi\">4</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mi\">4</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mf\">2.0</span><span class=\"o\">*</span><span class=\"n\">_data_I_21_0m1</span><span class=\"p\">[</span><span class=\"mi\">4</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mf\">2.0</span><span class=\"o\">*</span><span class=\"n\">_data_I_21_01</span><span class=\"p\">[</span><span class=\"mi\">4</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"n\">_data_I_21_01</span><span class=\"p\">[</span><span class=\"mi\">4</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mi\">4</span><span class=\"p\">];</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"p\">}</span><span class=\"w\"></span>\n",
       "<span class=\"w\">   </span><span class=\"p\">}</span><span class=\"w\"></span>\n",
       "<span class=\"p\">}</span><span class=\"w\"></span>\n",
       "</pre></div>\n"
      ],
      "text/plain": [
       "FUNC_PREFIX void kernel(double * RESTRICT const _data_I, double * RESTRICT  _data_dst)\n",
       "{\n",
       "   double * RESTRICT _data_I_21 = _data_I + 1;\n",
       "   for (int64_t ctr_0 = 1; ctr_0 < 81; ctr_0 += 1)\n",
       "   {\n",
       "      double * RESTRICT  _data_dst_00 = _data_dst + 290*ctr_0;\n",
       "      double * RESTRICT _data_I_21_01 = _data_I_21 + 1160*ctr_0 + 1160;\n",
       "      double * RESTRICT _data_I_21_0m1 = _data_I_21 + 1160*ctr_0 - 1160;\n",
       "      for (int64_t ctr_1 = 1; ctr_1 < 289; ctr_1 += 1)\n",
       "      {\n",
       "         _data_dst_00[ctr_1] = -1.0*_data_I_21_01[4*ctr_1 + 4] - 1.0*_data_I_21_0m1[4*ctr_1 + 4] - 1.0*_data_I_21_0m1[4*ctr_1 - 4] - 2.0*_data_I_21_0m1[4*ctr_1] + 2.0*_data_I_21_01[4*ctr_1] + _data_I_21_01[4*ctr_1 - 4];\n",
       "      }\n",
       "   }\n",
       "}"
      ]
1579
1580
     },
     "metadata": {},
Markus Holzer's avatar
Markus Holzer committed
1581
     "output_type": "display_data"
1582
1583
1584
    }
   ],
   "source": [
Martin Bauer's avatar
Martin Bauer committed
1585
    "img_field, dst_field = ps.fields(\"I(4), dst : [2D]\", I=img.astype(np.double), dst=filtered_image)\n",
1586
1587
1588
1589
1590
    "\n",
    "sobel_x = -2 * img_field[-1,0](1) - img_field[-1,-1](1) - img_field[-1, +1](1) \\\n",
    "         +2 * img_field[+1,0](1) + img_field[+1,-1](1) - img_field[+1, +1](1)\n",
    "update_rule = ps.Assignment(dst_field[0,0], sobel_x)\n",
    "\n",
Martin Bauer's avatar
Martin Bauer committed
1591
    "ast = create_kernel(update_rule)\n",
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
    "ps.show_code(ast)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Compare this code to the version above. In this code the loop bounds and array offsets are constants, which usually leads to faster kernels."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Running on GPU\n",
    "\n",
    "If you have a CUDA enabled graphics card and [pycuda](https://mathema.tician.de/software/pycuda/) installed, *pystencils* can run your kernel on the GPU as well. You can find more details about this in the GPU tutorial."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
      "text/html": [
       "<style>pre { line-height: 125%; }\n",
       "td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }\n",
       "span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }\n",
       "td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }\n",
       "span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }\n",
       ".highlight .hll { background-color: #ffffcc }\n",
       ".highlight { background: #f8f8f8; }\n",
       ".highlight .c { color: #3D7B7B; font-style: italic } /* Comment */\n",
       ".highlight .err { border: 1px solid #FF0000 } /* Error */\n",
       ".highlight .k { color: #008000; font-weight: bold } /* Keyword */\n",
       ".highlight .o { color: #666666 } /* Operator */\n",
       ".highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */\n",
       ".highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */\n",
       ".highlight .cp { color: #9C6500 } /* Comment.Preproc */\n",
       ".highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */\n",
       ".highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */\n",
       ".highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */\n",
       ".highlight .gd { color: #A00000 } /* Generic.Deleted */\n",
       ".highlight .ge { font-style: italic } /* Generic.Emph */\n",
       ".highlight .gr { color: #E40000 } /* Generic.Error */\n",
       ".highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */\n",
       ".highlight .gi { color: #008400 } /* Generic.Inserted */\n",
       ".highlight .go { color: #717171 } /* Generic.Output */\n",
       ".highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */\n",
       ".highlight .gs { font-weight: bold } /* Generic.Strong */\n",
       ".highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */\n",
       ".highlight .gt { color: #0044DD } /* Generic.Traceback */\n",
       ".highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */\n",
       ".highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */\n",
       ".highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */\n",
       ".highlight .kp { color: #008000 } /* Keyword.Pseudo */\n",
       ".highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */\n",
       ".highlight .kt { color: #B00040 } /* Keyword.Type */\n",
       ".highlight .m { color: #666666 } /* Literal.Number */\n",
       ".highlight .s { color: #BA2121 } /* Literal.String */\n",
       ".highlight .na { color: #687822 } /* Name.Attribute */\n",
       ".highlight .nb { color: #008000 } /* Name.Builtin */\n",
       ".highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */\n",
       ".highlight .no { color: #880000 } /* Name.Constant */\n",
       ".highlight .nd { color: #AA22FF } /* Name.Decorator */\n",
       ".highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */\n",
       ".highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */\n",
       ".highlight .nf { color: #0000FF } /* Name.Function */\n",
       ".highlight .nl { color: #767600 } /* Name.Label */\n",
       ".highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */\n",
       ".highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */\n",
       ".highlight .nv { color: #19177C } /* Name.Variable */\n",
       ".highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */\n",
       ".highlight .w { color: #bbbbbb } /* Text.Whitespace */\n",
       ".highlight .mb { color: #666666 } /* Literal.Number.Bin */\n",
       ".highlight .mf { color: #666666 } /* Literal.Number.Float */\n",
       ".highlight .mh { color: #666666 } /* Literal.Number.Hex */\n",
       ".highlight .mi { color: #666666 } /* Literal.Number.Integer */\n",
       ".highlight .mo { color: #666666 } /* Literal.Number.Oct */\n",
       ".highlight .sa { color: #BA2121 } /* Literal.String.Affix */\n",
       ".highlight .sb { color: #BA2121 } /* Literal.String.Backtick */\n",
       ".highlight .sc { color: #BA2121 } /* Literal.String.Char */\n",
       ".highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */\n",
       ".highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */\n",
       ".highlight .s2 { color: #BA2121 } /* Literal.String.Double */\n",
       ".highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */\n",
       ".highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */\n",
       ".highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */\n",
       ".highlight .sx { color: #008000 } /* Literal.String.Other */\n",
       ".highlight .sr { color: #A45A77 } /* Literal.String.Regex */\n",
       ".highlight .s1 { color: #BA2121 } /* Literal.String.Single */\n",
       ".highlight .ss { color: #19177C } /* Literal.String.Symbol */\n",
       ".highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */\n",
       ".highlight .fm { color: #0000FF } /* Name.Function.Magic */\n",
       ".highlight .vc { color: #19177C } /* Name.Variable.Class */\n",
       ".highlight .vg { color: #19177C } /* Name.Variable.Global */\n",
       ".highlight .vi { color: #19177C } /* Name.Variable.Instance */\n",
       ".highlight .vm { color: #19177C } /* Name.Variable.Magic */\n",
       ".highlight .il { color: #666666 } /* Literal.Number.Integer.Long */</style>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
1697
1698
1699
1700
1701
1702
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
Markus Holzer's avatar
Markus Holzer committed
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
      "text/html": [
       "<div class=\"highlight\"><pre><span></span><span class=\"n\">FUNC_PREFIX</span><span class=\"w\"> </span><span class=\"kt\">void</span><span class=\"w\"> </span><span class=\"n\">kernel</span><span class=\"p\">(</span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\"> </span><span class=\"k\">const</span><span class=\"w\"> </span><span class=\"n\">_data_I</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\">  </span><span class=\"n\">_data_dst</span><span class=\"p\">)</span><span class=\"w\"></span>\n",
       "<span class=\"p\">{</span><span class=\"w\"></span>\n",
       "<span class=\"w\">   </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\"> </span><span class=\"n\">_data_I_21</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"n\">_data_I</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">;</span><span class=\"w\"></span>\n",
       "<span class=\"w\">   </span><span class=\"k\">for</span><span class=\"w\"> </span><span class=\"p\">(</span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">;</span><span class=\"w\"> </span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">&lt;</span><span class=\"w\"> </span><span class=\"mi\">81</span><span class=\"p\">;</span><span class=\"w\"> </span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">+=</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">)</span><span class=\"w\"></span>\n",
       "<span class=\"w\">   </span><span class=\"p\">{</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\">  </span><span class=\"n\">_data_dst_00</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"n\">_data_dst</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mi\">290</span><span class=\"o\">*</span><span class=\"n\">ctr_0</span><span class=\"p\">;</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\"> </span><span class=\"n\">_data_I_21_01</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"n\">_data_I_21</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mi\">1160</span><span class=\"o\">*</span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mi\">1160</span><span class=\"p\">;</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"kt\">double</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"w\"> </span><span class=\"n\">RESTRICT</span><span class=\"w\"> </span><span class=\"n\">_data_I_21_0m1</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"n\">_data_I_21</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mi\">1160</span><span class=\"o\">*</span><span class=\"n\">ctr_0</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mi\">1160</span><span class=\"p\">;</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"k\">for</span><span class=\"w\"> </span><span class=\"p\">(</span><span class=\"kt\">int64_t</span><span class=\"w\"> </span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">;</span><span class=\"w\"> </span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">&lt;</span><span class=\"w\"> </span><span class=\"mi\">289</span><span class=\"p\">;</span><span class=\"w\"> </span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">+=</span><span class=\"w\"> </span><span class=\"mi\">1</span><span class=\"p\">)</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"p\">{</span><span class=\"w\"></span>\n",
       "<span class=\"w\">         </span><span class=\"n\">_data_dst_00</span><span class=\"p\">[</span><span class=\"n\">ctr_1</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">=</span><span class=\"w\"> </span><span class=\"mf\">-1.0</span><span class=\"o\">*</span><span class=\"n\">_data_I_21_01</span><span class=\"p\">[</span><span class=\"mi\">4</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mi\">4</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mf\">1.0</span><span class=\"o\">*</span><span class=\"n\">_data_I_21_0m1</span><span class=\"p\">[</span><span class=\"mi\">4</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mi\">4</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mf\">1.0</span><span class=\"o\">*</span><span class=\"n\">_data_I_21_0m1</span><span class=\"p\">[</span><span class=\"mi\">4</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mi\">4</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mf\">2.0</span><span class=\"o\">*</span><span class=\"n\">_data_I_21_0m1</span><span class=\"p\">[</span><span class=\"mi\">4</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"mf\">2.0</span><span class=\"o\">*</span><span class=\"n\">_data_I_21_01</span><span class=\"p\">[</span><span class=\"mi\">4</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">+</span><span class=\"w\"> </span><span class=\"n\">_data_I_21_01</span><span class=\"p\">[</span><span class=\"mi\">4</span><span class=\"o\">*</span><span class=\"n\">ctr_1</span><span class=\"w\"> </span><span class=\"o\">-</span><span class=\"w\"> </span><span class=\"mi\">4</span><span class=\"p\">];</span><span class=\"w\"></span>\n",
       "<span class=\"w\">      </span><span class=\"p\">}</span><span class=\"w\"></span>\n",
       "<span class=\"w\">   </span><span class=\"p\">}</span><span class=\"w\"></span>\n",
       "<span class=\"p\">}</span><span class=\"w\"></span>\n",
       "</pre></div>\n"
      ],
      "text/plain": [
       "FUNC_PREFIX void kernel(double * RESTRICT const _data_I, double * RESTRICT  _data_dst)\n",
       "{\n",
       "   double * RESTRICT _data_I_21 = _data_I + 1;\n",
       "   for (int64_t ctr_0 = 1; ctr_0 < 81; ctr_0 += 1)\n",
       "   {\n",
       "      double * RESTRICT  _data_dst_00 = _data_dst + 290*ctr_0;\n",
       "      double * RESTRICT _data_I_21_01 = _data_I_21 + 1160*ctr_0 + 1160;\n",
       "      double * RESTRICT _data_I_21_0m1 = _data_I_21 + 1160*ctr_0 - 1160;\n",
       "      for (int64_t ctr_1 = 1; ctr_1 < 289; ctr_1 += 1)\n",
       "      {\n",
       "         _data_dst_00[ctr_1] = -1.0*_data_I_21_01[4*ctr_1 + 4] - 1.0*_data_I_21_0m1[4*ctr_1 + 4] - 1.0*_data_I_21_0m1[4*ctr_1 - 4] - 2.0*_data_I_21_0m1[4*ctr_1] + 2.0*_data_I_21_01[4*ctr_1] + _data_I_21_01[4*ctr_1 - 4];\n",
       "      }\n",
       "   }\n",
       "}"
      ]
1736
1737
     },
     "metadata": {},
Markus Holzer's avatar
Markus Holzer committed
1738
     "output_type": "display_data"
1739
1740
1741
    }
   ],
   "source": [
Markus Holzer's avatar
Markus Holzer committed
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
    "try:\n",
    "    import pycuda\n",
    "    from pystencils.gpucuda import BlockIndexing\n",
    "\n",
    "    gpu_ast = create_kernel(update_rule, target=ps.Target.GPU,\n",
    "                            gpu_indexing=BlockIndexing,\n",
    "                            gpu_indexing_params={'blockSize': (64, 1, 1)})\n",
    "\n",
    "    ps.show_code(ast)\n",
    "except ImportError:\n",
    "    print(\"Please install pycuda for GPU support\")"
1753
1754
1755
1756
1757
1758
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
Markus Holzer's avatar
Markus Holzer committed
1759
   "display_name": "Python 3 (ipykernel)",
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
Markus Holzer's avatar
Markus Holzer committed
1773
   "version": "3.10.2"
1774
1775
1776
  }
 },
 "nbformat": 4,
Jan Hönig's avatar
Jan Hönig committed
1777
 "nbformat_minor": 4
Markus Holzer's avatar
Markus Holzer committed
1778
}