Fix index bug in inputVector according to the new version of EMAM2CPP

parent cbb1ad67
......@@ -6,7 +6,7 @@ component ArgMax<Z(1:oo) n = 2>{
implementation Math{
maxIndex = 0;
Q maxValue = inputVector(0); //should be inputVector(1) but bug in EMAM2CPP
Q maxValue = inputVector(1);
for i = 2:n //should be 2:n but bug in EMAM2CPP
if inputVector(i) > maxValue
......
......@@ -17,7 +17,7 @@ inputVector=colvec(n);
void execute()
{
maxIndex = 0;
double maxValue = inputVector(0-1);
double maxValue = inputVector(1-1);
for( auto i=2;i<=n;++i){
if((inputVector(i-1) > maxValue)){
maxIndex = i-1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment