diff --git a/Documentation/FinalPresentation/Presentation.pdf b/Documentation/FinalPresentation/Presentation.pdf index 9f529278..448bd039 100644 Binary files a/Documentation/FinalPresentation/Presentation.pdf and b/Documentation/FinalPresentation/Presentation.pdf differ diff --git a/Documentation/FinalPresentation/Presentation.tex b/Documentation/FinalPresentation/Presentation.tex index 6b059873..b13a611d 100644 --- a/Documentation/FinalPresentation/Presentation.tex +++ b/Documentation/FinalPresentation/Presentation.tex @@ -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} @@ -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}