Skip to content

Commit 1039a16

Browse files
committed
ggml : remove duplicate static assert macros
1 parent 223696c commit 1039a16

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

ggml-impl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
// GGML internal header
66

7+
#include <assert.h>
78
#include <stddef.h>
89
#include <stdbool.h>
910
#include <string.h> // memcpy

ggml-quants.h

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
#pragma once
22

3-
// This is a private API for quantization and dequantization
4-
// Should not be used directly, use ggml.h instead
3+
#include "ggml-impl.h"
54

6-
#include "ggml.h"
5+
// GGML internal header
76

87
#include <stdint.h>
9-
#include <assert.h>
108
#include <stddef.h>
119

12-
#ifndef static_assert
13-
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201100L)
14-
#define static_assert(cond, msg) _Static_assert(cond, msg)
15-
#else
16-
#define static_assert(cond, msg) struct global_scope_noop_trick
17-
#endif
18-
#endif
19-
2010
#define QK4_0 32
2111
typedef struct {
2212
ggml_fp16_t d; // delta

llama.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,7 @@ static int32_t llama_kv_cache_cell_max(const struct llama_kv_cache & cache) {
14671467
}
14681468

14691469
static void llama_kv_cache_clear(struct llama_kv_cache & cache) {
1470-
for (int32_t i = 0; i < cache.size; ++i) {
1470+
for (int32_t i = 0; i < (int32_t) cache.size; ++i) {
14711471
cache.cells[i].pos = -1;
14721472
cache.cells[i].seq_id.clear();
14731473
}

0 commit comments

Comments
 (0)