News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Looking for a good tutorial on SIMD

Started by xanatose, June 06, 2016, 10:45:32 PM

Previous topic - Next topic

xanatose

While there is an excellent tutorial on using the FPU.

I wonder if there is a similar tutorial using the XMM registers.

jj2007

Attached what I use: RTF, opens in WordPad, MS Word etc.
When used with RichMasm, try e.g. add*-- in the findbox to get this:
ADDPD--Packed Double-Precision Floating-Point Add
ADDPS--Packed Single-Precision Floating-Point Add
ADDSD--Scalar Double-Precision Floating-Point Add
ADDSS--Scalar Single-Precision Floating-Point Add
ADDSUBPD--Packed Double-FP Add/Subtract
ADDSUBPS--Packed Single-FP Add/Subtract
FADD/FADDP/FIADD--Add
HADDPD--Packed Double-FP Horizontal Add
HADDPS--Packed Single-FP Horizontal Add
PADDB/PADDW/PADDD--Packed Add
PADDQ--Packed Quadword Add
PADDSB/PADDSW--Packed Add with Saturation
PADDUSB/PADDUSW--Packed Add Unsigned with Saturation
PMADDWD--Packed Multiply and Add


rrr314159

I never saw a good SIMD tutorial. Just very elementary stuff - usually for C++ programmers; the next step, Intel Architecture Manual. Nothing in between.
I am NaN ;)

hutch--

I would agree with that, the Intel manuals are the go, download the latest versions, have a coffee machine handy and some headache tablets but the latest ones have all the SSE instructions up through SSE 4.2 and the later AVX instructions as well. You will need the headache tablets for the complexity of AVX instructions.  :biggrin:

jj2007

You are right, no good tutorials around. The manuals are the best option BUT they are in pdf format, which is a PITA. My compromise solution (posted above) derives from this old thread, and I am quite happy with it because it is now searchable. But of course, you need an effort (and headache pills) to understand the concise language of an Intel manual 8)

Siekmanski

There is also this great book with several examples of SSE and AVX code:
Modern X86 Assembly Language Programming: 32-bit, 64-bit, SSE, and AVX by Daniel Kusswurm
ISBN-13:  978-1484200650
http://www.apress.com/9781484200650?gtmf=s
Creative coders use backward thinking techniques as a strategy.