#Learn SIMD for math engine

28 messages · Page 1 of 1 (latest)

vast breach
#

I found that knowing simd programming is plus skill if you want to work in AAA companies like rockstars and insomniac games so I want to learn this and apply this inside my 3d renderer rather than glm so any resources can you recommend use simd for game engine math libs, don't shader git hub repos I want to learn it not to get some libraries implementing it

young zephyr
#

SIMD for individual math operations is not usually a great use for it

#

The real power of using SIMD is for vectorizing a hot loop that is bottlenecked on arithmetic

vast breach
young zephyr
#

glm already has SIMD implementations

timber summit
#

read the simd intrinsic guide, look at simd implementations, use simd

vast breach
young zephyr
#

I'm not sure what you're asking for then

timber summit
vast breach
#

I'm looking for more resources and applications for it in any book

young zephyr
#

It's not really a book thing you just have to try using it

#

There's not much to it

timber summit
#

the reality is though, getting it working on one device, with one program layout, is a lot simpler than maintaining a cross-arch fast simd implementation

young zephyr
#

Yeah and like I said the real power is in vectorizing a specific problem, not just trying to turn a single 4-vector into a register

timber summit
vast breach
#

Ah ok so using vectorized Algorithms make it faster in processing, so I want to learn how to be able to do this

young zephyr
#

Run N loop iterations at once where N is the number of lanes you have

#

It's basically the same as how a GPU CU executes a wavefront

vast breach
#

if it like you say so what these companies want from you when the want people understanding simd

young zephyr
#

They will probably have wanted you to do some rigorous performance analysis to make empirically motivated performance optimizations using SIMD

vast breach
#

ok so i'm asking about resources to learn this skill

#

that's it

#

any help?

young zephyr
#

You'll need to find or create a problem that is bottlenecked by arithmetic

thorny idol
white solar
#

grab either Vector class library (from agner) or xsimd. I think directly going with the low level intrinsics is annoying. Their syntax/usability is horrid. but with those libs you have a vec4 and vec8 type and can do arithmetic with it

#

some typical programs you can practice with are:
frustum culling
cpu rasterization (harder)
transforming a mesh vertices by a matrix on cpu (easy)