Changes between Version 10 and Version 11 of SIMDVectorExampleInLLVM
 Timestamp:
 Oct 26, 2011 2:58:14 AM (5 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

SIMDVectorExampleInLLVM
v10 v11 407 407 408 408 Finally, 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 <4000x float>), the program will work ASIS with this simple conversion409  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 ASIS with this simple conversion 411 411  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