📔
[Lab] SIMD Lab
  • Outline
  • Introduction
    • What's SIMD
    • CPU support for SIMD
  • SIMD in C/C++
    • Get started
    • Data types
    • Intrinsics
    • Resources and References
Powered by GitBook
On this page

Was this helpful?

  1. Introduction

CPU support for SIMD

PreviousWhat's SIMDNextGet started

Last updated 3 years ago

Was this helpful?

SIMD has been developing and evolving for several generations. Intel and AMD CPUs provide their own SIMD instruction sets. Throughout this tutorial, we focus on Intel SIMD instructions, so please also write your assignments(assignment-1) using Intel SIMD. If your PC uses AMD CPU, you can do your assignments using Linux/HPC servers provided by the CSE department.

Intel has developed several generations of SIMD instruction sets, you can find all these instructions and guides on .

# make sure you've installed cmake (a compilation tool)
sudo apt-get install cmake

# clone the repo locally
git clone https://github.com/Mysticial/FeatureDetector

# cd to the repo
cd FeatureDetector

# generate makefile using cmake
cmake .

# compile the program
make

# run and get the result
./FeatureDetector_main

To ensure fairness, we will grade your assignments on the HPC15 provided by the CSE department, which supports a lot of (not all) SIMD instructions including:

  • MMX

  • SSE

  • SSE2

  • SSE3

  • SSSE3

  • SSE4.1

  • SSE4.2

  • AVX

Please make sure you only use the SIMD instructions supported by HPC15's CPU. The instructions supported by your own computer and Linux servers and hpc15 may be different. The simplest way is to compile and test your program on the server.

To find which SIMD instruction sets are supported by your CPU, compile and run using the following commands:

For more information about different SIMD instruction sets, please refer to . Roughly, MMX supports operations on integers, SSE supports single-precision floats and SSE2 supports double-precision floats and others supplement even more features.

this program
Intel Intrinsic Guide
https://software.intel.com/sites/landingpage/IntrinsicsGuide/
SIMD instruction sets provided by Intel