aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
authorDaniil Cherednik <dan.cherednik@gmail.com>2024-12-22 13:39:37 +0100
committerDaniil Cherednik <dan.cherednik@gmail.com>2024-12-22 14:44:27 +0100
commiteb33c262156f4feb67c523908add841077574021 (patch)
tree2f1765702fc2021274ace815e471113b29d79dd0 /src/util.h
parente2605699b7c79a8cb5d06b0069f32c3b01d4ded4 (diff)
parent74d6e04c21bddd435bd74c34dbe027b883772a76 (diff)
downloadatracdenc-eb33c262156f4feb67c523908add841077574021.tar.gz
Merge branch 'master' into new_psy
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/util.h b/src/util.h
index 7d8d65e..ff4399e 100644
--- a/src/util.h
+++ b/src/util.h
@@ -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 {