Implement new, simpler function overload resolution algorithm.
We now give each conversion a cost and then find the minimum sum of costs for all of the possible overloads. Fixes issue #194.
This commit is contained in:
12
tests/func-overload-max.ispc
Normal file
12
tests/func-overload-max.ispc
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
|
||||
export void f_f(uniform float RET[], uniform float aFOO[]) {
|
||||
float a = 1. / aFOO[programIndex];
|
||||
RET[programIndex] = max(0, a);
|
||||
}
|
||||
|
||||
export void result(uniform float RET[]) {
|
||||
RET[programIndex] = 1. / (1+programIndex);
|
||||
}
|
||||
Reference in New Issue
Block a user