From ef3f2085ff238469207d099562d61635e1f9e138 Mon Sep 17 00:00:00 2001 From: Morten Hustveit Date: Tue, 2 Dec 2014 15:02:25 -0500 Subject: 3dmath.c: Throw restrict on all parameters to sphere_intersect This saves 3ms / frame on yelena. --- 3dmath.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '3dmath.c') diff --git a/3dmath.c b/3dmath.c index 5b876f2..2693c32 100644 --- a/3dmath.c +++ b/3dmath.c @@ -19,7 +19,9 @@ normalize(float x[3]) { } float -sphere_intersect(float y[3], float r[3], const float s[3], const float d[3], const float c[3], float R) { +sphere_intersect(float* restrict y, float* restrict r, + const float* restrict s, const float* restrict d, + const float* restrict c, float R) { int i; float D, n[3], t, v[3]; -- cgit v1.2.3