From 18e721934fb18589979ae08354ba38586f5aff65 Mon Sep 17 00:00:00 2001 From: d-5t Date: Tue, 17 Mar 2026 18:06:29 +0800 Subject: [PATCH] add const qualifier to y_col Ensure const correctness for pointer y_col to improve code safety and prevent accidental modification --- src/ggml-bitnet-mad.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ggml-bitnet-mad.cpp b/src/ggml-bitnet-mad.cpp index 4ba9d6509..019e25c7c 100644 --- a/src/ggml-bitnet-mad.cpp +++ b/src/ggml-bitnet-mad.cpp @@ -808,7 +808,7 @@ void ggml_vec_dot_i2_i8_s_Nx1(int n, float * s, size_t bs, const void * vx, size accu[iy] = _mm256_setzero_si256(); } - int8_t * y_col = y + col * by; + const int8_t * y_col = y + col * by; for (int i = 0; i < group32_num; i++) { const uint8_t *px = x + i * 1024; @@ -1053,4 +1053,4 @@ void ggml_vec_dot_i2_i8_s(int n, float * s, size_t bs, const void * vx, size_t b { ggml_vec_dot_i2_i8_s_1x1(n, s, bs, vx, bx, vy, by, nrc); } -} \ No newline at end of file +}