Skip to content

Commit 988a626

Browse files
authored
Bug fix: assign correct argument bit ratio index
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
1 parent 6622ecb commit 988a626

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/function-builder.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ class FunctionBuilder {
576576
}
577577
return calleeBitRatio;
578578
}
579-
calleeNode.argumentBitRatios[i] = bitRatio;
579+
calleeNode.argumentBitRatios[argumentIndex] = bitRatio;
580580
return bitRatio;
581581
}
582582

@@ -624,4 +624,4 @@ class FunctionBuilder {
624624

625625
module.exports = {
626626
FunctionBuilder
627-
};
627+
};

0 commit comments

Comments
 (0)