mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-11-04 09:32:00 +00:00 
			
		
		
		
	ggml : remove duplicate static assert macros
This commit is contained in:
		@@ -4,6 +4,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// GGML internal header
 | 
					// GGML internal header
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <assert.h>
 | 
				
			||||||
#include <stddef.h>
 | 
					#include <stddef.h>
 | 
				
			||||||
#include <stdbool.h>
 | 
					#include <stdbool.h>
 | 
				
			||||||
#include <string.h> // memcpy
 | 
					#include <string.h> // memcpy
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,22 +1,12 @@
 | 
				
			|||||||
#pragma once
 | 
					#pragma once
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// This is a private API for quantization and dequantization
 | 
					#include "ggml-impl.h"
 | 
				
			||||||
// Should not be used directly, use ggml.h instead
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "ggml.h"
 | 
					// GGML internal header
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <stdint.h>
 | 
					#include <stdint.h>
 | 
				
			||||||
#include <assert.h>
 | 
					 | 
				
			||||||
#include <stddef.h>
 | 
					#include <stddef.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef static_assert
 | 
					 | 
				
			||||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201100L)
 | 
					 | 
				
			||||||
#define static_assert(cond, msg) _Static_assert(cond, msg)
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
#define static_assert(cond, msg) struct global_scope_noop_trick
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define QK4_0 32
 | 
					#define QK4_0 32
 | 
				
			||||||
typedef struct {
 | 
					typedef struct {
 | 
				
			||||||
    ggml_fp16_t d;          // delta
 | 
					    ggml_fp16_t d;          // delta
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1467,7 +1467,7 @@ static int32_t llama_kv_cache_cell_max(const struct llama_kv_cache & cache) {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void llama_kv_cache_clear(struct llama_kv_cache & cache) {
 | 
					static void llama_kv_cache_clear(struct llama_kv_cache & cache) {
 | 
				
			||||||
    for (int32_t i = 0; i < cache.size; ++i) {
 | 
					    for (int32_t i = 0; i < (int32_t) cache.size; ++i) {
 | 
				
			||||||
        cache.cells[i].pos = -1;
 | 
					        cache.cells[i].pos = -1;
 | 
				
			||||||
        cache.cells[i].seq_id.clear();
 | 
					        cache.cells[i].seq_id.clear();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user