/articles/toma

To get this branch, use:
bzr branch http://darksoft.org/webbzr/articles/toma
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
\begin{algorithm}[htb]
\DontPrintSemicolon
\caption{\label{alg:newcache} Advanced Caching Mode for \algorithmname~\ref{alg:alurec}  }
\Begin{
   $h \eq s_i \mul m_d$ \;
   $d_1 \eq $ \KwTex{$h_m + h + \fconst{0.5}$, $p + \fconst{0.5}$} \;
   $d \eq d_1$ \;
   \ForTo{i}{0}{(s_i - 1)}{
         $d_n \eq $ \KwTex{$h_m + i + \fconst{1.5}$, $p + \fconst{0.5}$} \;
         $\shmem{\vdata{d}}[m_p][h + i] \eq (float2)\vlist{d, d_n - d}$ \;
         $d \eq d_n$ \;
   }
 
   $d_1 \eq $\KwShflDown$(d_1, 1, s_t)$ \;
   $\shmem{\vdata{d}}[m_p][h + (s_i - 1)] \eq (float2)\vlist{d, d_1 - d}$ \;
}
\end{algorithm}