Skip to content

Commit

Permalink
added implementation slides
Browse files Browse the repository at this point in the history
  • Loading branch information
fythal committed Apr 15, 2016
1 parent f1851e8 commit 8de50f3
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 7 deletions.
Binary file modified Documentation/FinalPresentation/Presentation.pdf
Binary file not shown.
41 changes: 34 additions & 7 deletions Documentation/FinalPresentation/Presentation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,29 @@ \subsection{Impl. 1: Existing Module in GPU Memory}
\end{frame}

\subsubsection{Implementation of Select Methods on GPU}
\begin{frame}
\begin{frame}[fragile]
\frametitle{Impl. 1 -- \texttt{Times}}
\begin{block}{Times\_CUDA}
\begin{lstlisting}
int tid = blockDim.x * blockIdx.x + threadIdx.x;
if (tid < nEntries)
theData[tid].xSec = theData[tid].xSec * factor;
\end{lstlisting}
\end{block}
\end{frame}

\begin{frame}
\begin{frame}[fragile]
\frametitle{Impl. 1 -- \texttt{GetXSec}}
\begin{block}{GetXSec\_CUDA}
\begin{lstlisting}
int start = (blockDim.x * blockIdx.x + threadIdx.x);
for (int i = start; i < nEntries; i += numThreads)
if (theData[i].energy >= e) {
resultIndex = Min(resultIndex, i);
return;
}
\end{lstlisting}
\end{block}
\end{frame}

\subsubsection{Impl. 1: Performance}
Expand Down Expand Up @@ -367,25 +384,35 @@ \subsection{Impl. 2: Add New GPU-Accelerated Methods to Interface}

\begin{frame}[fragile]
\frametitle{Implementation -- \texttt{GetXSecList}}
\begin{block}{GetXSecList}
\begin{lstlisting}[language=C++,basicstyle=\ttfamily,keywordstyle=\color{red}]
int stepSize = sqrt(nEntries);
int i = 0;
double e = queryList[threadID];
stepSize = sqrt(nEntries);
i = 0;
e = queryList[threadID];

for (i = 0; i < nEntries; i += stepSize)
if (d_theData[i].energy >= e)
break;

\end{lstlisting}
\end{block}
\end{frame}

\begin{frame}[fragile]
\frametitle{Implementation -- \texttt{GetXSecList -- cont}}
\begin{block}{GetXSecList -- cont}
\begin{lstlisting}[language=C++, basicstyle=\ttfamily, keywordstyle=\color{red}]
i = i - (stepSize - 1);

for (; i < nEntries; i++)
if (d_theData[i].energy >= e)
break;

d_minIndices[idx] = i;
d_queryList[threadID] = i;
\end{lstlisting}
\end{block}
\end{frame}


\subsubsection{Impl. 2: Performance}
\begin{frame}
\frametitle{Impl. 2: Performance Results Summary}
Expand Down

0 comments on commit 8de50f3

Please sign in to comment.