#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)
#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;
};
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
struct whisper_context * ctx,
const char * text,
whisper_token * tokens,
- int n_max_tokens);
+ int n_max_tokens);
// Largest language id (i.e. number of available languages - 1)
WHISPER_API int whisper_lang_max_id();