-
Notifications
You must be signed in to change notification settings - Fork 0
/
mv_op.tex
56 lines (48 loc) · 2.42 KB
/
mv_op.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
\documentclass{report}
\usepackage{xcolor}
\usepackage{listings}
\input{lststyle_hir.tex}
\begin{document}
\begin{lstlisting}[style=dsl]
computation MV():
field y, x
op mm
imap map1
forall cell in horizontal domain:
for k in bottomLayer, topLayer - 1:
forall df1 in ndf1:
forall df2 in ndf1:
y[map1[cell,df] + k] = y[map1[cell,df] + k]
+ mm[df1,df2,(cell-1)*nlayers +k+1]*x[map1[cell,df2]+k]
\end{lstlisting}
\subsection{Dimensionality: Fields}
\begin{enumerate}
\item Fields are one-dimensional unique degrees of freedom over an unstructured mesh.
\item They are of a builtin type, a floating point number, which could, for example be double precision.
\item The dimesionality is fixed, but is fields on different function spaces have different sizes.
\item The computation can be parallelised over columns.
\end{enumerate}
\subsection{Dimensionality: Operators}
\begin{enumerate}
\item Operators are three-dimensional first two dimesions are the number of degrees of freedom per cell from the space it maps from, to the space it maps to. The third dimsension is the number 3d cells.
\item They are of a builtin type, a floating point number, which could, for example be double precision.
\item The dimesionality is fixed, but is fields on different function spaces have different sizes.
\item The computation can be parallelised over columns.
\item This kernel can be parallelised in the vertical dimension with some care.
\end{enumerate}
\subsection{Access patterns}
\begin{enumerate}
\item Dofs which live on horizontally shared mesh entities, such as a
vertical face, will be accessed by multiple columns.
\item Dofs which live on vertically shared mesh entities, such as
horizontal face, will be accessd by multiple layers.
\item The application will access all the neighbours
\item This kernel only access one level of neighbours.
\item This kernel has uniform access.
\item Accesses are absolute horizontally and relative vertically.
\item Indirect addressing via the imap is required for the
absolute horizontal addressing.
\item The field x and operator m is {\em read}, the field y is {\em incremented}.
\item Whilst operators are domain decomposed, there is no need to overlap the domains ({\em i.e.} a halo) as the FEM assembly is performed when the operator is constructed.
\end{enumerate}
\end{document}