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:
Matt Pharr
2012-03-27 13:25:11 -07:00
parent 247775d1ec
commit f8a39402a2
6 changed files with 214 additions and 269 deletions

View 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);
}