Forum Discussion
Altera_Forum
Honored Contributor
12 years agoI'm a little unsure what you are trying to achieve with those first two code lines. Your foo function is coded to accept six unsigned int vectors each containing four elements but the way you are calling foo you are using scalar values in some cases.
So for the last two kernel arguments you are passing scalars when the function is expecting vectors. For the 3rd and 4th kernel arguments you are either passing a scalar and the function is expecting a vector, or those pad0 and pad1 variables are vectors and you are performing an XOR with a scalar (I can't tell since I don't see you define pad0 or pad1 in your post). If you intention was to perform a vector XOR using the same value for all the elements you would do this instead: pad0^(0x5C5C5C5CU, 0x5C5C5C5CU, 0x5C5C5C5CU, 0x5C5C5C5CU) Again I'm just guessing what the intension is since I'm not entirely sure what you intended the code to do.