cudaapplications.pdf
(
3342 KB
)
Pobierz
CUDA APPLICATIONS
Evgenij Lebedev
Copyright c 2019 Evgenij Lebedev
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 Interna-
tional License (the “License”). You may not use this file except in compliance with the License. You
may obtain a copy of the License at
https://creativecommons.org/licenses/by-nc-nd/
4.0/.
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an “
AS IS
”
BASIS
,
WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND
, either express or implied. See the License for the specific language governing permissions
and limitations under the License.
First printing, December 2019
Contents
Preface
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
I
1
1.1
1.2
1.3
1.3.1
1.3.2
Part One: Classical CUDA Programming
Writing CUDA kernels for interpolation
. . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Technical requirements
Knowing the interpolation problem
Understanding nearest-neighbor interpolation
9
10
12
Nearest-neighbor interpolation: one-dimensional case . . . . . . . . . . . . . . . . . . 14
Nearest-neighbor interpolation: two-dimensional case . . . . . . . . . . . . . . . . . . 14
1.4
1.4.1
1.4.2
Understanding linear and bilinear interpolations
14
Linear interpolation: one-dimensional case . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Linear interpolation: two-dimensional case . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.5
1.6
1.7
1.8
1.8.1
1.8.2
1.8.3
1.8.4
Towards practice: CUDA texture memory
Getting familiar with texture filtering in the one-dimensional case
Practice: Nearest-neighbor and linear interpolations of a PGM image
Understanding cubic B-spline interpolation
Cubic interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Cubic B-spline interpolation . . . . . . . . . . . . . . . . . . . . . . . . . .
Cubic B-spline interpolation implemented as texture filtering
Understanding Bicubic interpolation . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
17
20
25
31
31
32
32
34
1.9
1.10
1.11
Practice: Bicubic B-spline interpolation of a PGM image
Exercises
Summary
35
37
42
Bibliography
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Books
Articles
45
45
Index
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Preface
CUDA (Compute Unified Device Architecture) is a hardware architecture and programming model
introduced by NVIDIA for the parallel processing of Graphics Processing Units (GPUs). Thanks to
CUDA, developers, and researchers can write industrial and scientific applications exploiting the
massive parallelism released by the thousands of cores of NVIDIA graphic cards using extensions
of common programming languages like C/C++, Java, Fortran, Python, and Matlab or accelerated
libraries as OpenCV, Tensorflow, and Pytorch. CUDA-based GPU acceleration has permitted,
after 10 years from its very first launch, the development of applications considered severely
computationally demanding or even impossible to be run. These have regarded biomedical imaging,
oil and natural resource exploration, computer vision, bioinformatics, and life science until opening
the doors to artificial intelligence today. We are all astonished when a web application is capable to
recognize the face of our friends in a photo, but few of us are aware that CUDA is running in the
background. In this book, we will see CUDA, in its various forms, at work on modern applications
of science and technology which require high-performance processing.
We will catch the CUDA typical usage along with the related programming tricks and exploit the
largely available CUDA environment made of several, highly optimized and performing libraries.
We will develop several codes related to modern applications of parallel programming with CUDA.
All the developed codes will be available for download. In this book, different projects will be
presented which will regard the application of parallel programming on GPU to problems of
industrial and scientific interest, by using CUDA as the programming language.
Plik z chomika:
jonedave3
Inne pliki z tego folderu:
C - Herbert Schildt.epub
(22892 KB)
C Programming - Program Design Including Data Structures.pdf
(25696 KB)
C Game Development By Example 2019.pdf
(8527 KB)
C# 7 and .NET Core 2.0 Blueprints - Dirk Strauss & Jas Rademeyer.pdf
(38123 KB)
C 14 Quick Syntax Reference (2nd Edition) - Mikael Olsson.pdf
(907 KB)
Inne foldery tego chomika:
@other-lang
@packed
0
1
2-1
Zgłoś jeśli
naruszono regulamin