From 49beb2cdb8af54202ec122e3e07789a46d519dae Mon Sep 17 00:00:00 2001 From: Iwan Kawrakow Date: Wed, 19 Apr 2023 18:46:44 +0200 Subject: [PATCH] Better follow ggml conventions for function names --- ggml.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ggml.c b/ggml.c index 5177baeb4..dd150718e 100644 --- a/ggml.c +++ b/ggml.c @@ -1124,14 +1124,14 @@ static void quantize_row_q4_2_reference(const float * restrict x, block_q4_2 * r } } -static inline int nearestInt(float fval) { +static inline int nearest_int(float fval) { assert(fval <= 4194303.f); float val = fval + 12582912.f; int i; memcpy(&i, &val, sizeof(int)); return (i & 0x007fffff) - 0x00400000; } -static float kQuantizeWithBounds(int n, int nmin, int nmax, const float * restrict X, int nCandidates, +static float kquantize_q4_with_bounds(int n, int nmin, int nmax, const float * restrict X, int nCandidates, const float * restrict candidates, int8_t * restrict L) { assert (nmin >= INT8_MIN); assert (nmax <= INT8_MAX); @@ -1147,7 +1147,7 @@ static float kQuantizeWithBounds(int n, int nmin, int nmax, const float * restri float sumlxP = 0; int suml2P = 0; float sumlxM = 0; int suml2M = 0; for (int i=0; i