X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/book_gpu.git/blobdiff_plain/a2aa3f0f91a668ee6e799bad0f4de90b7b2be452..2ce2baf7820f44ab044b4df98722576116551e57:/BookGPU/Chapters/chapter3/ch3.tex?ds=sidebyside diff --git a/BookGPU/Chapters/chapter3/ch3.tex b/BookGPU/Chapters/chapter3/ch3.tex index b8ff22c..e9199dc 100755 --- a/BookGPU/Chapters/chapter3/ch3.tex +++ b/BookGPU/Chapters/chapter3/ch3.tex @@ -4,7 +4,7 @@ \newcommand{\kr}{\includegraphics[scale=0.6]{Chapters/chapter3/img/kernRight.png}} -\chapter{Setting up the environment.} +\chapter{Setting up the environment} Image processing using a GPU often means using it as a general purpose computing processor, which soon brings up the issue of data transfers, especially when kernel runtime is fast and/or when large data sets are processed. The truth is that, in certain cases, data transfers between GPU and CPU are slower than the actual computation on GPU. It remains that global runtime can still be faster than similar processes run on CPU. @@ -15,7 +15,7 @@ Obviously, our code originally accepts various image dimensions and can process However, so as to propose concise and more readable code, we will assume the following limitations: 16~bit-coded gray-level input images whose dimensions $H\times W$ are multiples of 512 pixels. -\section{Data transfers, memory management.} +\section{Data transfers, memory management} This section deals with the following issues: \begin{enumerate} \item Data transfer from CPU memory to GPU global memory: several GPU memory areas are available as destination memory but the 2D caching mechanism of texture memory, \index{memory hierarchy!texture memory} specifically designed for fetching neighboring pixels, is currently the fastest way to fetch gray-level pixel values inside a kernel computation. This has led us to choose \textbf{texture memory} as primary GPU memory area for input images. @@ -105,7 +105,7 @@ Designing a 2D median filter basically consists of defining a square window $H(i \begin{figure}[b] \centering \includegraphics[width=8cm]{Chapters/chapter3/img/median_1.png} - \caption{Example of 5x5 median filtering} + \caption{Example of 5x5 median filtering.} \label{fig:median_1} \end{figure} Figure \ref{fig:sap_examples} shows an example of a $512\times 512$ pixel image, corrupted by a \textit{salt and pepper} noise and the denoised versions, output respectively by a $3\times 3$, a $5\times 5$, and 2 iterations of a $3\times 3$ median filter. @@ -139,7 +139,7 @@ On the GPU's side, we note high dependence on window size due to the redundancy \begin{figure}[h] \centering \includegraphics[width=5cm]{Chapters/chapter3/img/median_overlap.png} - \caption{Illustration of window overlapping in 5x5 median filtering} + \caption{Illustration of window overlapping in 5x5 median filtering.} \label{fig:median_overlap} \end{figure}