Skip to main content

AVX Programming – Packed Integers

  • Chapter
  • First Online:
Modern X86 Assembly Language Programming
  • 532 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 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. 2.

    In this example, Loop1 is partially unrolled.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

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

Publish with us

Policies and ethics