aboutsummaryrefslogtreecommitdiffstats
path: root/test/common.h
diff options
context:
space:
mode:
authorDaniil Cherednik <dan.cherednik@gmail.com>2024-07-06 10:56:15 +0000
committerDaniil Cherednik <dan.cherednik@gmail.com>2024-07-06 10:56:15 +0000
commit41705edc6d36ad013cbcb171d53891f3c33764d8 (patch)
treec88a75ab8089720d0e354037d0585eb1d51af20a /test/common.h
parent311a633f24410ce3302526941b32639aa8869654 (diff)
downloadlibgha-41705edc6d36ad013cbcb171d53891f3c33764d8.tar.gz
Make possible to use double and own fft lib.HEADmaster
Projects which use the library may have own fft librray. Projects may use double precision floating point numbers.
Diffstat (limited to 'test/common.h')
-rw-r--r--test/common.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/common.h b/test/common.h
index 6757422..f29461d 100644
--- a/test/common.h
+++ b/test/common.h
@@ -1,10 +1,11 @@
+#include <include/libgha.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <math.h>
-static inline int compare_phase(float a, float b, float delta) {
+static inline int compare_phase(FLOAT a, FLOAT b, FLOAT delta) {
if (fabs(a - b) < delta)
return 0;
a = fmod(a + M_PI, 2 * M_PI);
@@ -15,7 +16,7 @@ static inline int compare_phase(float a, float b, float delta) {
return -1;
}
-static inline int load_file(const char* name, size_t len, size_t offset, size_t bits, float* buf)
+static inline int load_file(const char* name, size_t len, size_t offset, size_t bits, FLOAT* buf)
{
union {
char b[4];