diff --git a/src/sfizz/Panning.cpp b/src/sfizz/Panning.cpp index f7b96bd9..5c2cf455 100644 --- a/src/sfizz/Panning.cpp +++ b/src/sfizz/Panning.cpp @@ -49,10 +49,10 @@ inline void tickPan(const float* pan, float* leftBuffer, float* rightBuffer) void pan(const float* panEnvelope, float* leftBuffer, float* rightBuffer, unsigned size) noexcept { - const auto sentinel = panEnvelope + size; + const auto* sentinel = panEnvelope + size; #if SFIZZ_HAVE_NEON - const auto firstAligned = prevAligned(panEnvelope + TypeAlignment - 1); + const auto* firstAligned = prevAligned(panEnvelope + TypeAlignment - 1); if (willAlign(panEnvelope, leftBuffer, rightBuffer) && (firstAligned < sentinel)) { while (panEnvelope < firstAligned) { @@ -63,7 +63,7 @@ void pan(const float* panEnvelope, float* leftBuffer, float* rightBuffer, unsign uint32_t indices[TypeAlignment]; float leftPan[TypeAlignment]; float rightPan[TypeAlignment]; - const auto lastAligned = prevAligned(sentinel); + const auto* lastAligned = prevAligned(sentinel); while (panEnvelope < lastAligned) { float32x4_t mmPan = vld1q_f32(panEnvelope); mmPan = vaddq_f32(mmPan, vdupq_n_f32(1.0f)); @@ -112,10 +112,10 @@ inline void tickWidth(const float* width, float* leftBuffer, float* rightBuffer) void width(const float* widthEnvelope, float* leftBuffer, float* rightBuffer, unsigned size) noexcept { - const auto sentinel = widthEnvelope + size; + const auto* sentinel = widthEnvelope + size; #if SFIZZ_HAVE_NEON - const auto firstAligned = prevAligned(widthEnvelope + TypeAlignment - 1); + const auto* firstAligned = prevAligned(widthEnvelope + TypeAlignment - 1); if (willAlign(widthEnvelope, leftBuffer, rightBuffer) && firstAligned < sentinel) { while (widthEnvelope < firstAligned) { @@ -126,7 +126,7 @@ void width(const float* widthEnvelope, float* leftBuffer, float* rightBuffer, un uint32_t indices[TypeAlignment]; float coeff1[TypeAlignment]; float coeff2[TypeAlignment]; - const auto lastAligned = prevAligned(sentinel); + const auto* lastAligned = prevAligned(sentinel); while (widthEnvelope < lastAligned) { float32x4_t mmWidth = vld1q_f32(widthEnvelope); mmWidth = vaddq_f32(mmWidth, vdupq_n_f32(1.0f)); diff --git a/src/sfizz/SIMDHelpers.h b/src/sfizz/SIMDHelpers.h index a7b9a08c..fc5e2337 100644 --- a/src/sfizz/SIMDHelpers.h +++ b/src/sfizz/SIMDHelpers.h @@ -663,10 +663,10 @@ void sfzInterpolationCast(absl::Span floatJumps, absl::Span jumps, SFIZZ_CHECK(jumps.size() >= floatJumps.size()); SFIZZ_CHECK(jumps.size() == coeffs.size()); - auto floatJump = floatJumps.data(); - auto jump = jumps.data(); - auto coeff = coeffs.data(); - const auto sentinel = floatJump + min(floatJumps.size(), jumps.size(), coeffs.size()); + auto* floatJump = floatJumps.data(); + auto* jump = jumps.data(); + auto* coeff = coeffs.data(); + const auto* sentinel = floatJump + min(floatJumps.size(), jumps.size(), coeffs.size()); while (floatJump < sentinel) _internals::snippetSFZInterpolationCast(floatJump, jump, coeff); diff --git a/src/sfizz/sfizz_wrapper.cpp b/src/sfizz/sfizz_wrapper.cpp index 3e103b2e..8dffaf6a 100644 --- a/src/sfizz/sfizz_wrapper.cpp +++ b/src/sfizz/sfizz_wrapper.cpp @@ -21,55 +21,55 @@ sfizz_synth_t* sfizz_create_synth() bool sfizz_load_file(sfizz_synth_t* synth, const char* path) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->loadSfzFile(path); } bool sfizz_load_string(sfizz_synth_t* synth, const char* path, const char* text) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->loadSfzString(path, text); } bool sfizz_load_scala_file(sfizz_synth_t* synth, const char* path) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->loadScalaFile(path); } bool sfizz_load_scala_string(sfizz_synth_t* synth, const char* text) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->loadScalaString(text); } void sfizz_set_scala_root_key(sfizz_synth_t* synth, int root_key) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->setScalaRootKey(root_key); } int sfizz_get_scala_root_key(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->getScalaRootKey(); } void sfizz_set_tuning_frequency(sfizz_synth_t* synth, float frequency) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->setTuningFrequency(frequency); } float sfizz_get_tuning_frequency(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->getTuningFrequency(); } void sfizz_load_stretch_tuning_by_ratio(sfizz_synth_t* synth, float ratio) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->loadStretchTuningByRatio(ratio); } @@ -80,105 +80,105 @@ void sfizz_free(sfizz_synth_t* synth) int sfizz_get_num_regions(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->getNumRegions(); } int sfizz_get_num_groups(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->getNumGroups(); } int sfizz_get_num_masters(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->getNumMasters(); } int sfizz_get_num_curves(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->getNumCurves(); } char* sfizz_export_midnam(sfizz_synth_t* synth, const char* model) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return strdup(self->exportMidnam(model ? model : "").c_str()); } size_t sfizz_get_num_preloaded_samples(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->getNumPreloadedSamples(); } int sfizz_get_num_active_voices(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->getNumActiveVoices(); } void sfizz_set_samples_per_block(sfizz_synth_t* synth, int samples_per_block) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->setSamplesPerBlock(samples_per_block); } void sfizz_set_sample_rate(sfizz_synth_t* synth, float sample_rate) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->setSampleRate(sample_rate); } void sfizz_send_note_on(sfizz_synth_t* synth, int delay, int note_number, char velocity) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->noteOn(delay, note_number, velocity); } void sfizz_send_note_off(sfizz_synth_t* synth, int delay, int note_number, char velocity) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->noteOff(delay, note_number, velocity); } void sfizz_send_cc(sfizz_synth_t* synth, int delay, int cc_number, char cc_value) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->cc(delay, cc_number, cc_value); } void sfizz_send_hdcc(sfizz_synth_t* synth, int delay, int cc_number, float norm_value) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->hdcc(delay, cc_number, norm_value); } void sfizz_send_pitch_wheel(sfizz_synth_t* synth, int delay, int pitch) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->pitchWheel(delay, pitch); } void sfizz_send_aftertouch(sfizz_synth_t* synth, int delay, char aftertouch) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->aftertouch(delay, aftertouch); } void sfizz_send_tempo(sfizz_synth_t* synth, int delay, float seconds_per_quarter) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->tempo(delay, seconds_per_quarter); } void sfizz_send_time_signature(sfizz_synth_t* synth, int delay, int beats_per_bar, int beat_unit) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->timeSignature(delay, beats_per_bar, beat_unit); } void sfizz_send_time_position(sfizz_synth_t* synth, int delay, int bar, float bar_beat) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->timePosition(delay, bar, bar_beat); } void sfizz_send_playback_state(sfizz_synth_t* synth, int delay, int playback_state) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->playbackState(delay, playback_state); } void sfizz_render_block(sfizz_synth_t* synth, float** channels, int num_channels, int num_frames) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); // Only stereo output is supported for now ASSERT(num_channels == 2); UNUSED(num_channels); @@ -187,24 +187,24 @@ void sfizz_render_block(sfizz_synth_t* synth, float** channels, int num_channels unsigned int sfizz_get_preload_size(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->getPreloadSize(); } void sfizz_set_preload_size(sfizz_synth_t* synth, unsigned int preload_size) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->setPreloadSize(preload_size); } sfizz_oversampling_factor_t sfizz_get_oversampling_factor(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return static_cast(self->getOversamplingFactor()); } bool sfizz_set_oversampling_factor(sfizz_synth_t* synth, sfizz_oversampling_factor_t oversampling) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); using sfz::Oversampling; switch(oversampling) { @@ -227,67 +227,67 @@ bool sfizz_set_oversampling_factor(sfizz_synth_t* synth, sfizz_oversampling_fact int sfizz_get_sample_quality(sfizz_synth_t* synth, sfizz_process_mode_t mode) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->getSampleQuality(static_cast(mode)); } void sfizz_set_sample_quality(sfizz_synth_t* synth, sfizz_process_mode_t mode, int quality) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->setSampleQuality(static_cast(mode), quality); } void sfizz_set_volume(sfizz_synth_t* synth, float volume) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->setVolume(volume); } float sfizz_get_volume(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->getVolume(); } void sfizz_set_num_voices(sfizz_synth_t* synth, int num_voices) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->setNumVoices(num_voices); } int sfizz_get_num_voices(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->getNumVoices(); } int sfizz_get_num_buffers(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->getAllocatedBuffers(); } int sfizz_get_num_bytes(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->getAllocatedBytes(); } void sfizz_enable_freewheeling(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->enableFreeWheeling(); } void sfizz_disable_freewheeling(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->disableFreeWheeling(); } char* sfizz_get_unknown_opcodes(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); const auto unknownOpcodes = self->getUnknownOpcodes(); size_t totalLength = 0; for (auto& opcode: unknownOpcodes) @@ -309,61 +309,61 @@ char* sfizz_get_unknown_opcodes(sfizz_synth_t* synth) bool sfizz_should_reload_file(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->shouldReloadFile(); } bool sfizz_should_reload_scala(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->shouldReloadScala(); } void sfizz_enable_logging(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->enableLogging(); } void sfizz_set_logging_prefix(sfizz_synth_t* synth, const char* prefix) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->setLoggingPrefix(prefix); } void sfizz_disable_logging(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->disableLogging(); } void sfizz_all_sound_off(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->allSoundOff(); } void sfizz_add_external_definitions(sfizz_synth_t* synth, const char* id, const char* value) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->getParser().addExternalDefinition(id, value); } void sfizz_clear_external_definitions(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); self->getParser().clearExternalDefinitions(); } unsigned int sfizz_get_num_key_labels(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->getKeyLabels().size(); } int sfizz_get_key_label_number(sfizz_synth_t* synth, int label_index) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); const auto keyLabels = self->getKeyLabels(); if (label_index < 0) return SFIZZ_OUT_OF_BOUNDS_LABEL_INDEX; @@ -381,7 +381,7 @@ int sfizz_get_key_label_number(sfizz_synth_t* synth, int label_index) const char * sfizz_get_key_label_text(sfizz_synth_t* synth, int label_index) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); const auto keyLabels = self->getKeyLabels(); if (label_index < 0) return NULL; @@ -394,13 +394,13 @@ const char * sfizz_get_key_label_text(sfizz_synth_t* synth, int label_index) unsigned int sfizz_get_num_cc_labels(sfizz_synth_t* synth) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); return self->getCCLabels().size(); } int sfizz_get_cc_label_number(sfizz_synth_t* synth, int label_index) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); const auto ccLabels = self->getCCLabels(); if (label_index < 0) return SFIZZ_OUT_OF_BOUNDS_LABEL_INDEX; @@ -418,7 +418,7 @@ int sfizz_get_cc_label_number(sfizz_synth_t* synth, int label_index) const char * sfizz_get_cc_label_text(sfizz_synth_t* synth, int label_index) { - auto self = reinterpret_cast(synth); + auto* self = reinterpret_cast(synth); const auto ccLabels = self->getCCLabels(); if (label_index < 0) return NULL; diff --git a/src/sfizz/simd/HelpersAVX.cpp b/src/sfizz/simd/HelpersAVX.cpp index 8fff4dc8..3b919827 100644 --- a/src/sfizz/simd/HelpersAVX.cpp +++ b/src/sfizz/simd/HelpersAVX.cpp @@ -18,7 +18,7 @@ constexpr unsigned ByteAlignment = TypeAlignment * sizeof(Type); void gain1AVX(float gain, const float* input, float* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; #if SFIZZ_HAVE_AVX const auto* lastAligned = prevAligned(sentinel); @@ -38,7 +38,7 @@ void gain1AVX(float gain, const float* input, float* output, unsigned size) noex void gainAVX(const float* gain, const float* input, float* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; #if SFIZZ_HAVE_AVX const auto* lastAligned = prevAligned(sentinel); diff --git a/src/sfizz/simd/HelpersSSE.cpp b/src/sfizz/simd/HelpersSSE.cpp index 4f8daf25..3a9d65c4 100644 --- a/src/sfizz/simd/HelpersSSE.cpp +++ b/src/sfizz/simd/HelpersSSE.cpp @@ -19,7 +19,7 @@ constexpr unsigned ByteAlignment = TypeAlignment * sizeof(Type); void readInterleavedSSE(const float* input, float* outputLeft, float* outputRight, unsigned inputSize) noexcept { - const auto sentinel = input + inputSize - 1; + const auto* sentinel = input + inputSize - 1; #if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(input + inputSize - TypeAlignment); @@ -56,7 +56,7 @@ void readInterleavedSSE(const float* input, float* outputLeft, float* outputRigh void writeInterleavedSSE(const float* inputLeft, const float* inputRight, float* output, unsigned outputSize) noexcept { - const auto sentinel = output + outputSize - 1; + const auto* sentinel = output + outputSize - 1; #if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(output + outputSize - TypeAlignment); @@ -84,7 +84,7 @@ void writeInterleavedSSE(const float* inputLeft, const float* inputRight, float* void gain1SSE(float gain, const float* input, float* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; #if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(sentinel); @@ -104,7 +104,7 @@ void gain1SSE(float gain, const float* input, float* output, unsigned size) noex void gainSSE(const float* gain, const float* input, float* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; #if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(sentinel); @@ -123,7 +123,7 @@ void gainSSE(const float* gain, const float* input, float* output, unsigned size void divideSSE(const float* input, const float* divisor, float* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; #if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(sentinel); @@ -142,7 +142,7 @@ void divideSSE(const float* input, const float* divisor, float* output, unsigned void multiplyAddSSE(const float* gain, const float* input, float* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; #if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(sentinel); @@ -163,7 +163,7 @@ void multiplyAddSSE(const float* gain, const float* input, float* output, unsign void multiplyAdd1SSE(float gain, const float* input, float* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; #if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(sentinel); @@ -185,7 +185,7 @@ void multiplyAdd1SSE(float gain, const float* input, float* output, unsigned siz void multiplyMulSSE(const float* gain, const float* input, float* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; #if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(sentinel); @@ -206,7 +206,7 @@ void multiplyMulSSE(const float* gain, const float* input, float* output, unsign void multiplyMul1SSE(float gain, const float* input, float* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; #if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(sentinel); @@ -228,7 +228,7 @@ void multiplyMul1SSE(float gain, const float* input, float* output, unsigned siz float linearRampSSE(float* output, float start, float step, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; #if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(sentinel); @@ -257,7 +257,7 @@ float linearRampSSE(float* output, float start, float step, unsigned size) noexc float multiplicativeRampSSE(float* output, float start, float step, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; #if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(sentinel); @@ -286,7 +286,7 @@ float multiplicativeRampSSE(float* output, float start, float step, unsigned siz void addSSE(const float* input, float* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; #if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(sentinel); @@ -305,7 +305,7 @@ void addSSE(const float* input, float* output, unsigned size) noexcept void add1SSE(float value, float* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; #if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(sentinel); @@ -325,7 +325,7 @@ void add1SSE(float value, float* output, unsigned size) noexcept void subtractSSE(const float* input, float* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; #if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(sentinel); @@ -344,7 +344,7 @@ void subtractSSE(const float* input, float* output, unsigned size) noexcept void subtract1SSE(float value, float* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; #if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(sentinel); @@ -365,7 +365,7 @@ void subtract1SSE(float value, float* output, unsigned size) noexcept void copySSE(const float* input, float* output, unsigned size) noexcept { // The sentinel is the input here - const auto sentinel = input + size; + const auto* sentinel = input + size; #if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(sentinel); @@ -383,7 +383,7 @@ void copySSE(const float* input, float* output, unsigned size) noexcept float meanSSE(const float* vector, unsigned size) noexcept { - const auto sentinel = vector + size; + const auto* sentinel = vector + size; float result { 0.0f }; if (size == 0) @@ -415,7 +415,7 @@ float meanSSE(const float* vector, unsigned size) noexcept float sumSquaresSSE(const float* vector, unsigned size) noexcept { - const auto sentinel = vector + size; + const auto* sentinel = vector + size; float result { 0.0f }; if (size == 0) @@ -455,7 +455,7 @@ void cumsumSSE(const float* input, float* output, unsigned size) noexcept if (size == 0) return; - const auto sentinel = output + size; + const auto* sentinel = output + size; *output++ = *input++; #if SFIZZ_HAVE_SSE2 @@ -488,7 +488,7 @@ void diffSSE(const float* input, float* output, unsigned size) noexcept if (size == 0) return; - const auto sentinel = output + size; + const auto* sentinel = output + size; *output++ = *input++; #if SFIZZ_HAVE_SSE2 @@ -521,7 +521,7 @@ void clampAllSSE(float* input, float low, float high, unsigned size) noexcept if (size == 0) return; - const auto sentinel = input + size; + const auto* sentinel = input + size; #if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(sentinel); @@ -555,7 +555,7 @@ bool allWithinSSE(const float* input, float low, float high, unsigned size) noex if (low > high) std::swap(low, high); - const auto sentinel = input + size; + const auto* sentinel = input + size; #if SFIZZ_HAVE_SSE2 const auto* lastAligned = prevAligned(sentinel); diff --git a/src/sfizz/simd/HelpersScalar.h b/src/sfizz/simd/HelpersScalar.h index 33c4af3f..83b37867 100644 --- a/src/sfizz/simd/HelpersScalar.h +++ b/src/sfizz/simd/HelpersScalar.h @@ -10,7 +10,7 @@ template inline void readInterleavedScalar(const T* input, T* outputLeft, T* outputRight, unsigned inputSize) noexcept { - const auto sentinel = input + inputSize - 1; + const auto* sentinel = input + inputSize - 1; while (input < sentinel) { *outputLeft++ = *input++; *outputRight++ = *input++; @@ -20,7 +20,7 @@ inline void readInterleavedScalar(const T* input, T* outputLeft, T* outputRight, template inline void writeInterleavedScalar(const T* inputLeft, const T* inputRight, T* output, unsigned outputSize) noexcept { - const auto sentinel = output + outputSize - 1; + const auto* sentinel = output + outputSize - 1; while (output < sentinel) { *output++ = *inputLeft++; *output++ = *inputRight++; @@ -30,7 +30,7 @@ inline void writeInterleavedScalar(const T* inputLeft, const T* inputRight, T* o template inline void gain1Scalar(T gain, const T* input, T* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; while (output < sentinel) *output++ = gain * (*input++); } @@ -38,7 +38,7 @@ inline void gain1Scalar(T gain, const T* input, T* output, unsigned size) noexce template inline void gainScalar(const T* gain, const T* input, T* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; while (output < sentinel) *output++ = (*gain++) * (*input++); } @@ -46,7 +46,7 @@ inline void gainScalar(const T* gain, const T* input, T* output, unsigned size) template inline void divideScalar(const T* input, const T* divisor, T* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; while (output < sentinel) *output++ = (*input++) / (*divisor++); } @@ -54,7 +54,7 @@ inline void divideScalar(const T* input, const T* divisor, T* output, unsigned s template inline void multiplyAddScalar(const T* gain, const T* input, T* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; while (output < sentinel) *output++ += (*gain++) * (*input++); } @@ -62,7 +62,7 @@ inline void multiplyAddScalar(const T* gain, const T* input, T* output, unsigned template inline void multiplyAdd1Scalar(T gain, const T* input, T* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; while (output < sentinel) *output++ += gain * (*input++); } @@ -70,7 +70,7 @@ inline void multiplyAdd1Scalar(T gain, const T* input, T* output, unsigned size) template inline void multiplyMulScalar(const T* gain, const T* input, T* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; while (output < sentinel) *output++ *= (*gain++) * (*input++); } @@ -78,7 +78,7 @@ inline void multiplyMulScalar(const T* gain, const T* input, T* output, unsigned template inline void multiplyMul1Scalar(T gain, const T* input, T* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; while (output < sentinel) *output++ *= gain * (*input++); } @@ -86,7 +86,7 @@ inline void multiplyMul1Scalar(T gain, const T* input, T* output, unsigned size) template T linearRampScalar(T* output, T start, T step, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; while (output < sentinel) { *output++ = start; start += step; @@ -97,7 +97,7 @@ T linearRampScalar(T* output, T start, T step, unsigned size) noexcept template T multiplicativeRampScalar(T* output, T start, T step, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; while (output < sentinel) { *output++ = start; start *= step; @@ -108,7 +108,7 @@ T multiplicativeRampScalar(T* output, T start, T step, unsigned size) noexcept template inline void addScalar(const T* input, T* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; while (output < sentinel) *output++ += *input++; } @@ -116,7 +116,7 @@ inline void addScalar(const T* input, T* output, unsigned size) noexcept template inline void add1Scalar(T value, T* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; while (output < sentinel) *output++ += value; } @@ -124,7 +124,7 @@ inline void add1Scalar(T value, T* output, unsigned size) noexcept template inline void subtractScalar(const T* input, T* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; while (output < sentinel) *output++ -= *input++; } @@ -132,7 +132,7 @@ inline void subtractScalar(const T* input, T* output, unsigned size) noexcept template inline void subtract1Scalar(T value, T* output, unsigned size) noexcept { - const auto sentinel = output + size; + const auto* sentinel = output + size; while (output < sentinel) *output++ -= value; } @@ -150,7 +150,7 @@ T meanScalar(const T* vector, unsigned size) noexcept if (size == 0) return result; - const auto sentinel = vector + size; + const auto* sentinel = vector + size; while (vector < sentinel) result += *vector++; @@ -164,7 +164,7 @@ T sumSquaresScalar(const T* vector, unsigned size) noexcept if (size == 0) return result; - const auto sentinel = vector + size; + const auto* sentinel = vector + size; while (vector < sentinel) { result += (*vector) * (*vector); vector++; @@ -179,7 +179,7 @@ void cumsumScalar(const T* input, T* output, unsigned size) noexcept if (size == 0) return; - const auto sentinel = output + size; + const auto* sentinel = output + size; *output++ = *input++; while (output < sentinel) { @@ -194,7 +194,7 @@ void diffScalar(const T* input, T* output, unsigned size) noexcept if (size == 0) return; - const auto sentinel = output + size; + const auto* sentinel = output + size; *output++ = *input++; while (output < sentinel) { @@ -209,7 +209,7 @@ void clampAllScalar(T* input, T low, T high, unsigned size ) noexcept if (size == 0) return; - const auto sentinel = input + size; + const auto* sentinel = input + size; while (input < sentinel) { const float clampedAbove = *input > high ? high : *input; *input = clampedAbove < low ? low : clampedAbove; @@ -226,7 +226,7 @@ bool allWithinScalar(const T* input, T low, T high, unsigned size ) noexcept if (low > high) std::swap(low, high); - const auto sentinel = input + size; + const auto* sentinel = input + size; while (input < sentinel) { if (*input < low || *input > high) return false;