mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-06-19 23:33:43 +00:00
ggml : define MIN / MAX only if not defined (minor)
This commit is contained in:
Submodule bindings/ios updated: 1502317fe0...6707f1ea1c
8
ggml.c
8
ggml.c
@ -88,9 +88,6 @@ typedef void* thread_ret_t;
|
|||||||
#define GGML_MEM_ALIGN 16
|
#define GGML_MEM_ALIGN 16
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
|
||||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
|
||||||
|
|
||||||
#define UNUSED(x) (void)(x)
|
#define UNUSED(x) (void)(x)
|
||||||
#define SWAP(x, y, T) do { T SWAP = x; x = y; y = SWAP; } while (0)
|
#define SWAP(x, y, T) do { T SWAP = x; x = y; y = SWAP; } while (0)
|
||||||
|
|
||||||
@ -108,6 +105,11 @@ typedef void* thread_ret_t;
|
|||||||
#include <cblas.h>
|
#include <cblas.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#undef MIN
|
||||||
|
#undef MAX
|
||||||
|
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||||
|
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||||
|
|
||||||
// floating point type used to accumulate sums
|
// floating point type used to accumulate sums
|
||||||
typedef double ggml_float;
|
typedef double ggml_float;
|
||||||
|
|
||||||
|
@ -435,8 +435,7 @@ struct whisper_context {
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
static void read_safe(std::ifstream& fin, T& dest)
|
static void read_safe(std::ifstream& fin, T& dest) {
|
||||||
{
|
|
||||||
fin.read((char*)& dest, sizeof(T));
|
fin.read((char*)& dest, sizeof(T));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user