diff options
author | Chris Robinson <[email protected]> | 2016-10-06 01:39:18 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-10-06 01:39:18 -0700 |
commit | 76cd6797b7e58272e4e5268f1461f209045b9de4 (patch) | |
tree | 7c16fc353376d3bec215ebe208ac7a96f6f3f205 /Alc/mixer_c.c | |
parent | 965e91c702db7b79fe70124634902712fd19b4ad (diff) |
Add some more 'restrict' keywords
Diffstat (limited to 'Alc/mixer_c.c')
-rw-r--r-- | Alc/mixer_c.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Alc/mixer_c.c b/Alc/mixer_c.c index a75ad002..6ef818c7 100644 --- a/Alc/mixer_c.c +++ b/Alc/mixer_c.c @@ -8,17 +8,17 @@ #include "alAuxEffectSlot.h" -static inline ALfloat point32(const ALfloat *vals, ALuint UNUSED(frac)) +static inline ALfloat point32(const ALfloat *restrict vals, ALuint UNUSED(frac)) { return vals[0]; } -static inline ALfloat lerp32(const ALfloat *vals, ALuint frac) +static inline ALfloat lerp32(const ALfloat *restrict vals, ALuint frac) { return lerp(vals[0], vals[1], frac * (1.0f/FRACTIONONE)); } -static inline ALfloat fir4_32(const ALfloat *vals, ALuint frac) +static inline ALfloat fir4_32(const ALfloat *restrict vals, ALuint frac) { return resample_fir4(vals[-1], vals[0], vals[1], vals[2], frac); } -static inline ALfloat fir8_32(const ALfloat *vals, ALuint frac) +static inline ALfloat fir8_32(const ALfloat *restrict vals, ALuint frac) { return resample_fir8(vals[-3], vals[-2], vals[-1], vals[0], vals[1], vals[2], vals[3], vals[4], frac); } -const ALfloat *Resample_copy32_C(const BsincState* UNUSED(state), const ALfloat *src, ALuint UNUSED(frac), +const ALfloat *Resample_copy32_C(const BsincState* UNUSED(state), const ALfloat *restrict src, ALuint UNUSED(frac), ALuint UNUSED(increment), ALfloat *restrict dst, ALuint numsamples) { #if defined(HAVE_SSE) || defined(HAVE_NEON) @@ -32,7 +32,7 @@ const ALfloat *Resample_copy32_C(const BsincState* UNUSED(state), const ALfloat #define DECL_TEMPLATE(Sampler) \ const ALfloat *Resample_##Sampler##_C(const BsincState* UNUSED(state), \ - const ALfloat *src, ALuint frac, ALuint increment, \ + const ALfloat *restrict src, ALuint frac, ALuint increment, \ ALfloat *restrict dst, ALuint numsamples) \ { \ ALuint i; \ @@ -54,8 +54,9 @@ DECL_TEMPLATE(fir8_32) #undef DECL_TEMPLATE -const ALfloat *Resample_bsinc32_C(const BsincState *state, const ALfloat *src, ALuint frac, - ALuint increment, ALfloat *restrict dst, ALuint dstlen) +const ALfloat *Resample_bsinc32_C(const BsincState *state, const ALfloat *restrict src, + ALuint frac, ALuint increment, ALfloat *restrict dst, + ALuint dstlen) { const ALfloat *fil, *scd, *phd, *spd; const ALfloat sf = state->sf; |