Skip to content

Commit

Permalink
Add a mono scale-by-float block function (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
baconpaul authored May 31, 2024
1 parent 04324dc commit 8da120a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/sst/basic-blocks/mechanics/block-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,14 @@ inline void scale_by(const float *__restrict scale, float *__restrict targetL,
}
}

template <size_t blockSize> inline void scale_by(const float scale, float *__restrict target)
{
for (auto i = 0U; i < blockSize; ++i)
{
target[i] *= scale;
}
}

template <size_t blockSize>
inline void scale_by(const float scale, float *__restrict targetL, float *__restrict targetR)
{
Expand Down

0 comments on commit 8da120a

Please sign in to comment.