Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
10 years ago

Shift operation on vector datatypes

Hi,

Is there a better way to perform a shift operation on a vector datatype to the general approach below:

float4 value;

float new;

float4 result;

result.w = value.z;

result.z =value.y;

result.y = value.x;

result.x = new;

Many thanks
No RepliesBe the first to reply