diff options
Diffstat (limited to 'report')
| -rwxr-xr-x | report/report.tex | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/report/report.tex b/report/report.tex index 82f0766..efc976d 100755 --- a/report/report.tex +++ b/report/report.tex @@ -215,29 +215,27 @@ $i^\text{th}$ pair in the array points to. The psudocode for this can be seen on from this psudocode, hence the psudocode instead of assembly. This also makes it easier to understand.} -\begin{algorithm}[H] - \DontPrintSemicolon % optional: removes ; - \SetAlgoNoLine - \SetKwInOut{Input}{Input} - \SetKwInOut{Output}{Output} - - \Input{File descriptor $f$} - \Output{Pointer and size of array $A$} - \BlankLine - - \texttt{// Pointer to file data in $p$ and length of that data in $n$.}\\ +\begin{wrapfigure}[18]{r}{0.5\textwidth} + \textbf{Input\ \ :} File descriptor $f$\\ + \textbf{Output:} Pointer and size of array $A$\\ + \\ + \texttt{// Pointer to file data in $p$ and}\\ + \texttt{// length of that data in $n$.}\\ $p,n\leftarrow$ create\_file\_buffer($f$)\\ - \texttt{// Pointer to pairwise data in $p$ and number of pairs in $n$}\\ + \texttt{// Pointer to pairwise data in $p$}\\ + \texttt{// and number of pairs in $n$}\\ $p,n\leftarrow$ make\_pairwise\_data($p,n$)\\ - \texttt{// Allocate space for final array, and save pointer in $A$}\\ + \texttt{// Allocate space for final array,}\\ + \texttt{// and save pointer in $A$}\\ $A\leftarrow$ allocate($8n$)\\ - \texttt{// Put memmory address of pair $i$ at index $i$ in $A$}\\ - \For{$i\leftarrow 0$ \KwTo $n-1$}{ - $A[i]\leftarrow$ mem\_addr($p[2i]$) - } - \Return $A$ and $n$ + \texttt{// Put memmory address of pair $i$}\\ + \texttt{// at index $i$ in $A$}\\ + \textbf{for } $i\leftarrow 0$\textbf{ to }$n-1$\textbf{ do}\\ + \hspace*{2em}$A[i]\leftarrow$ mem\_addr($p[2i]$)\\ + \textbf{end}\\ + \textbf{return} $A$ and $n$ \caption{Pseudocode for \texttt{array\_maker}}\label{fig:arraymaker} -\end{algorithm} +\end{wrapfigure} \newpage |