Skip to content

Commit

Permalink
Const inputs are labeled const on Cytomic and Biquad (#60)
Browse files Browse the repository at this point in the history
in some cases at least
  • Loading branch information
baconpaul authored Sep 21, 2024
1 parent 1e037cd commit 6514385
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
13 changes: 8 additions & 5 deletions include/sst/filters/BiquadFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ struct alignas(16) BiquadFilter
// void process_block_SSE2(float *data);
void process_block(float *dataL, float *dataR);
// void process_block_SSE2(float *dataL,float *dataR);
void process_block_to(float *, float *);
void process_block_to(float *dataL, float *dataR, float *dstL, float *dstR);
void process_block_to(const float *const, float *);
void process_block_to(const float *const dataL, const float *const dataR, float *dstL,
float *dstR);
// void process_block_to_SSE2(float *dataL,float *dataR, float *dstL,float *dstR);
void process_block_slowlag(float *dataL, float *dataR);
// void process_block_slowlag_SSE2(float *dataL,float *dataR);
Expand Down Expand Up @@ -529,8 +530,9 @@ inline void BiquadFilter<D, BLOCK_SIZE, Adapter>::process_block(float *data)
}

template <typename D, size_t BLOCK_SIZE, typename Adapter>
inline void BiquadFilter<D, BLOCK_SIZE, Adapter>::process_block_to(float *__restrict data,
float *__restrict dataout)
inline void
BiquadFilter<D, BLOCK_SIZE, Adapter>::process_block_to(const float *__restrict const data,
float *__restrict dataout)
{
{
int k;
Expand Down Expand Up @@ -630,7 +632,8 @@ inline void BiquadFilter<D, BLOCK_SIZE, Adapter>::process_block(float *dataL, fl
}

template <typename D, size_t BLOCK_SIZE, typename Adapter>
inline void BiquadFilter<D, BLOCK_SIZE, Adapter>::process_block_to(float *dataL, float *dataR,
inline void BiquadFilter<D, BLOCK_SIZE, Adapter>::process_block_to(const float *const dataL,
const float *const dataR,
float *dstL, float *dstR)
{
{
Expand Down
5 changes: 3 additions & 2 deletions include/sst/filters/CytomicSVF.h
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ struct CytomicSVF
a3 = _mm_add_ps(a3, da3);
}

template <int blockSize> void processBlock(float *inL, float *inR, float *outL, float *outR)
template <int blockSize>
void processBlock(const float *const inL, const float *const inR, float *outL, float *outR)
{
for (int i = 0; i < blockSize; ++i)
{
Expand All @@ -351,7 +352,7 @@ struct CytomicSVF
}
}

template <int blockSize> void processBlock(float *inL, float *outL)
template <int blockSize> void processBlock(const float *const inL, float *outL)
{
for (int i = 0; i < blockSize; ++i)
{
Expand Down

0 comments on commit 6514385

Please sign in to comment.