Skip to content
0:00 / 0:00

#simd#vectorization#mandelbrot

SIMD and Vectorization: Parallelism in C++ #1/3 (multitasking on single core)

Bisqwit

147K subscribers • 12 videos on Hallway

YouTube

Advanced. Deep dive for people who know the field.

103K views9 years ago3 recommendations

Systems programmingGraphics and audioC++Performance and optimizationConcurrency and parallelism

Bisqwit demonstrates how to use SIMD and vectorization in C++ to parallelize mathematical computations on a single CPU core.

Computer programs can be made faster by making them do many things simultaneously. Let’s study three categorical ways to accomplish that in GCC. In the first episode, we explore various alternative approaches to SIMD: Single Instruction, Multiple Data. As a plot device in this tool-assisted education video, a Mandelbrot fractal is rendered. Twitter: twitter.com/RealBisqwit Liberapay: liberapay.com/Bisqwit (alternatives at iki.fi/bisqwit/donate.html) Twitch: twitch.tv/RealBisqwit Homepage: iki.fi/bisqwit/ You can contribute subtitles: youtube.com/timedtext_video?ref=share&v=Pc8DfEyAxzg All downloads: github.com/bisqwit/cpp_parallelization_examples Watch part 2 here: youtube.com/watch?v=MfEkOcMILDo Background music: — Cartooners (DOS) — Happy — Neal Vaughn (thirdparty play with ADLMIDI) Sound effects and foley are mostly from YouTube Audio Library. Some are recorded from video games like The Guardian Legend, Duck Hunt, Earthbound, and Super Mario All-Stars. #Bisqwit #Parallelism #Tutorial #Programming #SIMD #Vectorization

Why it's here

3 people recommend this

What people say. Highly recommended for its clear, practical demonstration of low-level SIMD optimization and compiler vectorization.

Moments people linked to

u/tamyahuNe2in r/programming • Recommends

On “is low-level assembly language dead? this was by far my favorite language it during my university days, and now wanted to get back into it but will i be wasting my time? is there any demand for this programming language in the industry?”

The assembly language is still used a lot in the domain of computer security and reverse engineering (studying malware, writing exploits, emulators), data processing (parallelizing data throughput), operating systems and driver development, embedded/mobile systems, specialized hardware stacks and such. In many places where you can optimize your code using SIMD instructions, both for x86 (AVX) and ARM (Neon), it's often better to write your own custom assembly code instead of relying on your compiler to properly vectorize your code. If we relax the definition of a low-level assembly language a bit, one can include also SPIR-V, Java bytecode, Microsoft CIL, WebAssembly, etc. You cannot re…
11View on Reddit

u/Rayterexin r/GraphicsProgramming • Recommends

On “What is the salary of a graphics programmer?”

I made my whole graphics project with more than 300+ modules in Python. I've worked several years as C and C++ software engineer and was writing a lot of assembly: x86, ARM, MIPS and PPC while porting compiler as company's project but even though I thought I have a lot of experience with low level programming, SIMD and optimizing math functions I was never really able to beat NumPy's speed even with very basic linear algebra functions. People use C/C++ because they think it will give them faster executables out of the box, but the thing is compilers in 2020 are still very bad at utilizing modern hardware, SIMD for instance. Bisqwit shows it in this series. I had a choice: to endlessly op…

u/staticrain2in r/C_Programming • Recommends

On “Benchmark code for AVX (SIMD)?”

…/gcc/X86-Built_002din-Functions.html#X86-Built_002din-Functions (scroll half way through until you reach: "The following built-in functions are available when -mavx is used. All of them generate the machine instruction that is part of the name.") I never did this so I don't know how this exacly works. __Edit:__ I got some Code, look at this Video link to this video he made his source Code public. It is written in C++.…

u/_youtubot_in r/programming • Mentions

On “0:02 / 20:27 Parallelism in C++ :: Part 3/3: Offloading (OpenMP, OpenACC, CUDA)”

Videos linked by /u/secretaryofstats: Title|Channel|Published|Duration|Likes|Total Views :----------:|:----------:|:----------:|:----------:|:----------:|:----------: Parallelism in C++ :: Part 2/3: Threads (hyperthreading, multiple cpu cores)|Bisqwit|2017-06-13|0:12:13|412+ (99%)|5,632 [Parallelism in C++ :: Part 1/3: SIMD (multitasking on single core / vector mathematics)]|Bisqwit|2017-06-09|0:12:51|788+ (99%)|12,306 --- ^Info ^| ^/u/secretaryofstats ^can ^delete ^| ^v1.1.3b