Abstract
The focus of this chapter is AVX integer programming using 128-bit wide SIMD operands. The first section examines several concise source code examples that illustrate packed integer arithmetic including addition, subtraction, and multiplication. This section also explains AVX bitwise logical operations and shifts. The second section contains two source code examples that demonstrate elementary SIMD calculations using integer arrays. Integer arrays are frequently utilized to maintain the pixels of a digital image. As you’ll soon see, AVX is ideally suited for many types of image processing algorithms.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Template class AlignedArray<> uses static function OS::AlignedMalloc() (see OS.h) to dynamically allocate a memory block that is aligned on a specific boundary. Class OS contains operating system helper functions that work on both Windows and Linux.
- 2.
In this example, Loop1 is partially unrolled.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature
About this chapter
Cite this chapter
Kusswurm, D. (2023). AVX Programming – Packed Integers. In: Modern X86 Assembly Language Programming. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-9603-5_8
Download citation
DOI: https://doi.org/10.1007/978-1-4842-9603-5_8
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-9602-8
Online ISBN: 978-1-4842-9603-5
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books