fixes
This commit is contained in:
Binary file not shown.
@ -311,6 +311,8 @@ The \texttt{Task} class can support matrixes of different element type rather th
|
|||||||
|
|
||||||
The \texttt{Writer} instead writes to disk the task to the same folder, overwriting existing files if present.
|
The \texttt{Writer} instead writes to disk the task to the same folder, overwriting existing files if present.
|
||||||
|
|
||||||
|
The \texttt{Stencil} class divides the matrix in rougly equal parts and distributes them to other workers.
|
||||||
|
|
||||||
%% - - - - - - - - - - - - - - - - - - %%
|
%% - - - - - - - - - - - - - - - - - - %%
|
||||||
\subsection{Native C++ Threads}
|
\subsection{Native C++ Threads}
|
||||||
|
|
||||||
@ -335,10 +337,10 @@ The structure of the implementation with native C++ threads is as follows:
|
|||||||
\end{algorithmic}
|
\end{algorithmic}
|
||||||
|
|
||||||
\begin{algorithmic}[1]
|
\begin{algorithmic}[1]
|
||||||
\Procedure{lambda}{$l, \Delta$}\Comment \textit{$l$ is the thread number, $\Delta$ is the ammount of rows to process}
|
\Procedure{lambda}{$l, \Delta$}\Comment \textit{$l$ is the index of block of rows, $\Delta$ is the number of rows}
|
||||||
\For{$x \in \{l \cdot \Delta, \ldots, (l+1) \cdot \Delta - 1\}$}
|
\For{$x \in \{l \cdot \Delta, \ldots, (l+1) \cdot \Delta - 1\}$}
|
||||||
\For{$y \in \{0, \ldots, Columns\}$}
|
\For{$y \in \{0, \ldots, Columns\}$}
|
||||||
\If $(x, y)$ not in the border
|
\If{$(x, y)$ not in the border}
|
||||||
\State calculate the neighborhood of $(x, y)$
|
\State calculate the neighborhood of $(x, y)$
|
||||||
\State $arena[x][y] = Stencil(neighborhood)$
|
\State $arena[x][y] = Stencil(neighborhood)$
|
||||||
\EndIf
|
\EndIf
|
||||||
@ -379,7 +381,7 @@ A custom emitter and collector would not have been faster and so the simpler app
|
|||||||
\begin{algorithmic}[1]
|
\begin{algorithmic}[1]
|
||||||
\Procedure{lambda}{$x$}
|
\Procedure{lambda}{$x$}
|
||||||
\For{$y \in \{0, \ldots, Columns\}$}
|
\For{$y \in \{0, \ldots, Columns\}$}
|
||||||
\If $(x, y)$ not in the border
|
\If {$(x, y)$ not in the border}
|
||||||
\State calculate the neighborhood of $(x, y)$
|
\State calculate the neighborhood of $(x, y)$
|
||||||
\State $arena[x][y] = Stencil(neighborhood)$
|
\State $arena[x][y] = Stencil(neighborhood)$
|
||||||
\EndIf
|
\EndIf
|
||||||
|
|||||||
Reference in New Issue
Block a user