Learn the fundamentals of x86 Single instruction multiple data (SIMD) programming using C++ intrinsic functions and x86-64 assembly language. This book emphasizes x86 SIMD programming topics and technologies that are relevant to modern software development in applications which can exploit data level parallelism, important for the processing of big data, large batches of data and related important in data science and much more.
Modern Parallel Programming with C++ and Assembly Language is an instructional text that explains x86 SIMD programming using both C++ and assembly language. The book's content and organization are designed to help you quickly understand and exploit the SIMD capabilities of x86 processors. It also contains an abundance of source code that is structured to accelerate learning and comprehension of essential SIMD programming concepts and algorithms.
After reading this book, you will be able to code performance-optimized AVX, AVX2, and AVX-512 algorithms using either C++ intrinsic functions or x86-64 assembly language.
You will:
Understand the essential details about x86 SIMD architectures and instruction sets including AVX, AVX2, and AVX-512. Master x86 SIMD data types, arithmetic instructions, and data management operations using both integer and floating-point operands. Code performance-enhancing functions and algorithms that fully exploit the SIMD capabilities of a modern x86 processor. Employ C++ intrinsic functions and x86-64 assembly language code to carry out arithmetic calculations using common programming constructs including arrays, matrices, and user-defined data structures. Harness the x86 SIMD instruction sets to significantly accelerate the performance of computationally intense algorithms in applications such as machine learning, image processing, computer graphics, statistics, and matrix arithmetic. Apply leading-edge coding strategies and techniques to optimally exploit the x86 SIMD instruction sets for maximum possible performance.
Autorentext
Daniel Kusswurm has over 35 years of professional experience as a software developer, computer scientist, and author. During his career, he has developed innovative software for medical devices, scientific instruments, and image processing applications. On many of these projects, he successfully employed C++ intrinsic functions, x86 assembly language, and SIMD programming techniques to significantly improve the performance of computationally intense algorithms or solve unique programming challenges. His educational background includes a BS in electrical engineering technology from Northern Illinois University along with an MS and PhD in computer science from DePaul University. Daniel Kusswurm is also the author of Modern X86 Assembly Language Programming (ISBN: 978-1484200650), Modern X86 Assembly Language Programming, Second Edition (ISBN: 978-1484240625), and Modern Arm Assembly Language Programming (ISBN: 978 1484262665), all published by Apress.
Inhalt
Modern X86 SIMD Programming Outline Page 1 of 7
D. Kusswurm F:\ModX86SIMD\Outline\ModernX86SIMD_Outline (v1).docx
Introduction
The Introduction presents an overview of the book and includes concise descriptions of each chapter. It also summaries the
hardware and software tools required to use the book's source code.
Overview
Target AudienceChapter Descriptions
Source Code
Additional Resources
Chapter 1 SIMD Fundamentals
Chapter 1 discusses SIMD fundamentals including data types, basic arithmetic, and common data manipulation operations.
Understanding of this material is necessary for the reader to successfully comprehend the book's subsequent chapters.
What is SIMD?
Simple C++ example (Ch01_01)
Brief History of x86 SIMD Instruction Set Extensions
MMX
SSE SSE4.2
AVX, AVX2, and AVX-512
SIMD Data Types
Fundamental types
128b, 256b, 512b
Integer types
Packed i8, i16, i32, i64 (signed and unsigned)
Floating-point types
Packed f16/b16, f32 and f64
Little-endian storage
SIMD Arithmetic Integer
Addition and subtraction
Wraparound vs. saturated
Multiplication
Bitwise logical
Floating-point
Addition, subtraction, multiplication, division, sqrt
Horizontal addition and subtraction
Fused multiply-accumulate (FMA)
SIMD Operations
Integer
Min & max
Compares
Shuffles, permutations, and blends
Size promotions and reductions Floating-point
Min & max
Compares
Shuffles, permutations, and blends
Size promotions and reductions
Modern X86 SIMD Programming Outline Page 2 of 7
D. Kusswurm F:\ModX86SIMD\Outline\ModernX86SIMD_Outline (v1).docx Masked moves
Conditional execution and merging (AVX-512)
SIMD Programming Overview
C++ compiler options
C++ SIMD intrinsic functions
Assembly language functions
Testing for AVX, AVX2, and AVX-512
Chapter 2 AVX C++ Programming - Part 1
Chapter 2 teaches AVX integer arithmetic and other operations using C++ intrinsic functions. It also discusses how to code a
few simple image processing algorithms using C++ intrinsic functions and AVX instructions.
Basic Integer Arithmetic
Addition (Ch02_01)
Subtraction (Ch02_02) Multiplication (Ch02_03)
Common Integer Operations
Bitwise logical operations (Ch02_04)
Arithmetic and logical shifts (Ch02_05)
Image Processing Algorithms
Pixel minimum and maximum (Ch02_06)
Pixel mean (Ch02_07)Chapter 3 AVX C++ Programming - Part 2
Chapter 3 is similar to the previous chapter but emphasizes floating-point instead of integer values. This chapter also
explains how to employ C++ intrinsic functions to perform SIMD arithmetic operations using floating-point arrays and
matrices.
Basic Floating-Point Arithmetic
Addition, subtraction, etc. (Ch03_01) Compares (Ch03_02)
Conversions (Ch03_03)
Floating-Point Arrays
Array mean and standard deviation (Ch03_04, Ch03_05)
Array square roots and compares (Ch03_06, Ch03_07)
Floating-Point Matrices
Matrix c...