Changes between Version 10 and Version 11 of SIMDVectorExampleInLLVM


Ignore:
Timestamp:
Oct 26, 2011 2:58:14 AM (4 years ago)
Author:
pmonday
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SIMDVectorExampleInLLVM

    v10 v11  
    407407
    408408Finally, a note on converting from arrays to vectors and subsequently optimizing to use vector adds.  The simplest way to do this was to:
    409 - convert the code to multiply 4 of the array values at a time
    410  - convert the array types to vector ([4000 x float] becomes <4000 x float>), the program will work AS-IS with this simple conversion
     409- convert the code to multiply 4 of the array values at a time (depends on the register sizes, data sizes, etc...)
     410 - convert the array types to vector ([128 x float] becomes <128 x float>), the program will work AS-IS with this simple conversion
    411411 - work through the loop again to move to a load of the proper location in the vector to a packed vector, then do the fadd of the vectors
    412 
    413 
     412 - vector sizes MUST be the size of a power of 2 (1, 2, 4, 8, 16, ....)
     413 - vector sizes seem to be limited, 32768 definitely did NOT work, 128 is working
     414
     415