Skip to content

Commit

Permalink
Bug fix: assign correct argument bit ratio index
Browse files Browse the repository at this point in the history
In "assignArgumentBitRatio" the index for "argumentBitRatios" should be the one of the function, not the kernel. Otherwise, you get a "bit ratio not found" error if you pass arguments to a function with a different order than they're passed to the kernel.
Fix gpujs#600
  • Loading branch information
exebetche authored Dec 2, 2021
1 parent 6622ecb commit 988a626
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/function-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ class FunctionBuilder {
}
return calleeBitRatio;
}
calleeNode.argumentBitRatios[i] = bitRatio;
calleeNode.argumentBitRatios[argumentIndex] = bitRatio;
return bitRatio;
}

Expand Down Expand Up @@ -624,4 +624,4 @@ class FunctionBuilder {

module.exports = {
FunctionBuilder
};
};

0 comments on commit 988a626

Please sign in to comment.