| 152 | "//Complex types test #3\r\n\ |
| 153 | import std.math;\r\n\ |
| 154 | float test(float4 a, float4 b){ return a.x*b.x+a.y*b.y+a.z*b.z+a.w*b.w; }\r\n\ |
| 155 | float4 test2(float4 u){ u.x += 5.0; return u; }\r\n\ |
| 156 | float4 float4(float all){ float4 ret; ret.x = ret.y = ret.z = ret.w = all; return ret; }\r\n\ |
| 157 | float sum(float[10] u){ float res = 0; for(int i = 0; i < 10; i++) res += u[i]; return res; }\r\n\ |
| 158 | float[10] inc(float[10] v){ float[10] res; for(int i = 0; i < 10; i++) res[i] = v[i]+1.0f; return res; }\r\n\ |