MMX/SSE/SSE2/!3DNow/...
Posted: Thu Jul 08, 2004 2:00 pm
Are Calculations(eg: a+b-c/2) in PB Apps MMX/SSE/SSE2/!3DNow/... optimized when I say to Compile a SSE Executable? Can I combine eg: MMX and !3DNow?
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
Since PureBasic 3.60, it's possible to creates specialized executables (or dynamic executables)
which can use optimized commands for MMX, 3DNOW, SSE and SSE2 processor. It's done at compile time
or at runtime, depending of the executable type (Normal or Dynamic CPU). Implements an optimized
function is very easy, just put _EXTENSION below the name.
Example (in C) to support MMX and 3DNOW format:
PB_CrossFading (int Rate) // Base function, working on all processors
PB_CrossFading_MMX (int Rate) // MMX optimized
PB_CrossFading_3DNOW (int Rate) // 3DNOW optimized
Now, you have to add in the .desc which optimized functions are available. The following
flags are available: MMX, 3DNOW, SSE and SSE2