Files
ispc/tests/func-overload-max.ispc
Matt Pharr f8a39402a2 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.
2012-03-27 13:25:11 -07:00

13 lines
286 B
Plaintext

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