mn416/QPULib

Summation of vector elements using QPULib

Opened this issue · 1 comments

Hi,
I use this code that you suggested befor but receive this error what is the problem ?

Int v;
...
v = v + rotate(8, v);
v = v + rotate(4, v);
v = v + rotate(2, v);
v = v + rotate(1, v);

D.cpp:13:20: error: call of overloaded ‘rotate(int, Int&)’ is ambiguous
v = v + rotate(1, v);
^
In file included from ../Lib/QPULib.h:4:0,
from ID.cpp:1:
../Lib/Source/Int.h:61:9: note: candidate: IntExpr rotate(IntExpr, IntExpr)
IntExpr rotate(IntExpr a, IntExpr b);
^~~~~~
../Lib/Source/Int.h:62:11: note: candidate: FloatExpr rotate(FloatExpr, IntExpr)
FloatExpr rotate(FloatExpr a, IntExpr b);

thank you.

The rotate functions takes operand to rotate as first argument, and amount to rotate as second, so:

v = v + rotate(v, 8);
v = v + rotate(v, 4);
v = v + rotate(v, 2);
v = v + rotate(v, 1);