mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-01-18 02:39:47 +00:00
ggml : define MIN / MAX only if not defined (minor)
This commit is contained in:
parent
0be6a1afd9
commit
d51c5eb906
@ -1 +1 @@
|
||||
Subproject commit 1502317fe050c1d5ae1a81082153b8f00d50d9cd
|
||||
Subproject commit 6707f1ea1caa7ee5e9b6908101fe98775e582cff
|
8
ggml.c
8
ggml.c
@ -88,9 +88,6 @@ typedef void* thread_ret_t;
|
||||
#define GGML_MEM_ALIGN 16
|
||||
#endif
|
||||
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
#define UNUSED(x) (void)(x)
|
||||
#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>
|
||||
#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
|
||||
typedef double ggml_float;
|
||||
|
||||
|
@ -435,9 +435,8 @@ struct whisper_context {
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
static void read_safe(std::ifstream& fin, T& dest)
|
||||
{
|
||||
fin.read((char*)& dest, sizeof(T));
|
||||
static void read_safe(std::ifstream& fin, T& dest) {
|
||||
fin.read((char*)& dest, sizeof(T));
|
||||
}
|
||||
|
||||
// load the model from a ggml file
|
||||
|
Loading…
Reference in New Issue
Block a user