diff options
author | Daniil Cherednik <dan.cherednik@gmail.com> | 2024-12-22 13:39:37 +0100 |
---|---|---|
committer | Daniil Cherednik <dan.cherednik@gmail.com> | 2024-12-22 14:44:27 +0100 |
commit | eb33c262156f4feb67c523908add841077574021 (patch) | |
tree | 2f1765702fc2021274ace815e471113b29d79dd0 /src/util.h | |
parent | e2605699b7c79a8cb5d06b0069f32c3b01d4ded4 (diff) | |
parent | 74d6e04c21bddd435bd74c34dbe027b883772a76 (diff) | |
download | atracdenc-eb33c262156f4feb67c523908add841077574021.tar.gz |
Merge branch 'master' into new_psy
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -44,15 +44,15 @@ inline void SwapArray(T* p, const size_t len) { } template<size_t N> -inline void InvertSpectrInPlase(TFloat* in) { +inline void InvertSpectrInPlase(float* in) { for (size_t i = 0; i < N; i+=2) in[i] *= -1; } template<size_t N> -inline std::vector<TFloat> InvertSpectr(const TFloat* in) { - std::vector<TFloat> buf(N); - std::memcpy(&buf[0], in, N * sizeof(TFloat)); +inline std::vector<float> InvertSpectr(const float* in) { + std::vector<float> buf(N); + std::memcpy(&buf[0], in, N * sizeof(float)); InvertSpectrInPlase<N>(&buf[0]); return buf; } @@ -90,7 +90,7 @@ inline T CalcEnergy(const std::vector<T>& in) { }); } -inline int ToInt(double x) { +inline int ToInt(float x) { #if defined(_MSC_VER) && !defined(_WIN64) int n; __asm { |