From 6529a84301d2ff8f733ac2061d2e8efeb06d80bc Mon Sep 17 00:00:00 2001 From: Thompson Lee Date: Thu, 4 Aug 2016 09:51:47 -0400 Subject: [PATCH] Adding "restrict" keyword to Mtx_Multiply(). --- include/c3d/maths.h | 2 +- source/maths/mtx_multiply.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/c3d/maths.h b/include/c3d/maths.h index 0a6cb57..21d0ea0 100644 --- a/include/c3d/maths.h +++ b/include/c3d/maths.h @@ -278,7 +278,7 @@ void Mtx_Identity(C3D_Mtx* out); * @param[in] a Multiplicand * @param[in] b Multiplier */ -void Mtx_Multiply(C3D_Mtx* out, const C3D_Mtx* a, const C3D_Mtx* b); +void Mtx_Multiply(C3D_Mtx* restrict out, const C3D_Mtx* a, const C3D_Mtx* b); /** * @brief Inverse a matrix diff --git a/source/maths/mtx_multiply.c b/source/maths/mtx_multiply.c index c7e6377..6f5e1be 100644 --- a/source/maths/mtx_multiply.c +++ b/source/maths/mtx_multiply.c @@ -1,8 +1,8 @@ #include -void Mtx_Multiply(C3D_Mtx* out, const C3D_Mtx* a, const C3D_Mtx* b) +void Mtx_Multiply(C3D_Mtx* restrict out, const C3D_Mtx* a, const C3D_Mtx* b) { - // http://www.wolframalpha.com/input/?i={{a,b,c,d},{e,f,g,h},{i,j,k,l},{m,n,o,p}}{{α,β,γ,δ},{ε,θ,ι,κ},{λ,μ,ν,ξ},{ο,π,ρ,σ}} + // http://www.wolframalpha.com/input/?i={{a,b,c,d},{e,f,g,h},{i,j,k,l},{m,n,o,p}}{{α,β,γ,δ},{ε,θ,ι,κ},{λ,μ,ν,ξ},{ο,Ï€,Ï�,σ}} int i, j; for (j = 0; j < 4; ++j) for (i = 0; i < 4; ++i)