1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-12 20:27:06 +01:00

QPX Integer reduction (+ integer reduction test)

This commit is contained in:
Lanny91
2017-06-14 10:55:10 +01:00
parent 2ad54c5a02
commit 735cbdb983
2 changed files with 52 additions and 6 deletions

View File

@ -540,10 +540,13 @@ namespace Optimization {
//Integer Reduce
template<>
inline Integer Reduce<Integer, int>::operator()(int in){
// FIXME unimplemented
printf("Reduce : Missing integer implementation -> FIX\n");
assert(0);
inline Integer Reduce<Integer, veci>::operator()(veci in){
Integer a = 0;
for (unsigned int i = 0; i < W<Integer>::r; ++i)
{
a += in.v[i];
}
return a;
}
}