Skip to content
Snippets Groups Projects
Commit 04a29a25 authored by Claudia Frauen's avatar Claudia Frauen
Browse files

Added full stencil operation example

parent 6f85cd37
No related branches found
No related tags found
1 merge request!72Draft: Compute devices lecture
Pipeline #70700 passed
Showing with 62 additions and 5 deletions
......@@ -86,21 +86,78 @@ show discretisation which points to boundary-data exchange
<br>
![](static/stencil_operations_1.png)
![](static/stencil_operations_1.jpg)
## Stencil operations
<br>
$x_t(i,j)=f(x_{t-1}(i-1,j),x_{t-1}(i,j),x_{t-1}(i+1,j),x_{t-1}(i,j-1),x_{t-1}(i,j+1))$
$x_t(i,j)=f(x_{t-1}(i-1,j),x_{t-1}(i,j),x_{t-1}(i+1,j))$
![](static/stencil_operations_2.png)
![](static/stencil_operations_2.jpg)
## Stencil operations
$x_t(i,j)=f(x_{t-1}(i-1,j),x_{t-1}(i,j),x_{t-1}(i+1,j),x_{t-1}(i,j-1),x_{t-1}(i,j+1))$
<br>
$x_t(i,j)=f(x_{t-1}(i-1,j),x_{t-1}(i,j),x_{t-1}(i+1,j))$
![](static/stencil_operations_3.jpg)
## Stencil operations - domain decomposition
$x_t(i,j)=f(x_{t-1}(i-1,j),x_{t-1}(i,j),x_{t-1}(i+1,j))$
![](static/stencil_operations_4.jpg)
![](static/stencil_operations_3.png)
## Stencil operations - domain decomposition
$x_t(i,j)=f(x_{t-1}(i-1,j),x_{t-1}(i,j),x_{t-1}(i+1,j))$
:::: {.columns}
::: {.column width="50%"}
* looking at a single block
* no problem when computing the central point
:::
::: {.column width="50%"}
![](static/stencil_operations_5.jpg)
:::
::::
## Stencil operations - domain decomposition
$x_t(i,j)=f(x_{t-1}(i-1,j),x_{t-1}(i,j),x_{t-1}(i+1,j))$
:::: {.columns}
::: {.column width="50%"}
* But what about the point on the right border?
:::
::: {.column width="50%"}
![](static/stencil_operations_6.jpg)
:::
::::
## Stencil operations - halo cells
$x_t(i,j)=f(x_{t-1}(i-1,j),x_{t-1}(i,j),x_{t-1}(i+1,j))$
:::: {.columns}
::: {.column width="50%"}
* Solution: Introduction of halo cells, which need to be communicated from the neighboring block
:::
::: {.column width="50%"}
![](static/stencil_operations_7.jpg)
:::
::::
## Beyond shared memory
If we want to scale beyond one node, what do we need in our example?
......
lectures/hardware/static/stencil_operations_1.jpg

23.5 KiB

lectures/hardware/static/stencil_operations_1.png

7.31 KiB

lectures/hardware/static/stencil_operations_2.jpg

24.8 KiB

lectures/hardware/static/stencil_operations_2.png

8.86 KiB

lectures/hardware/static/stencil_operations_3.jpg

24.3 KiB

lectures/hardware/static/stencil_operations_3.png

11.9 KiB

lectures/hardware/static/stencil_operations_4.jpg

25 KiB

lectures/hardware/static/stencil_operations_5.jpg

10.8 KiB

lectures/hardware/static/stencil_operations_6.jpg

10.6 KiB

lectures/hardware/static/stencil_operations_7.jpg

11.7 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment