Debian Codegraph @

src/h/cache.h

raw symbols SCIP
1 /* -*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*- */
2 /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */
3
4 /*
5 * Copyright (c) 2011, Juan Jose Garcia Ripoll.
6 *
7 * See file 'LICENSE' for the copyright details.
8 *
9 */
10
11 /* cache.h -- thread-local cache for a variety of operations */
12
13 #ifndef ECL_CACHE_H
14 #define ECL_CACHE_H
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19
20 typedef struct ecl_cache {
21 cl_object keys;
22 cl_object table;
23 cl_index generation;
24 #ifdef ECL_THREADS
25 cl_object clear_list;
26 #endif
27 } *ecl_cache_ptr;
28
29 typedef struct ecl_cache_record {
30 cl_object key; /* vector[ndx] */
31 cl_object value; /* vector[ndx+1] */
32 cl_object gen; /* vector[ndx+2] */
33 } *ecl_cache_record_ptr;
34
35 extern ecl_cache_ptr ecl_make_cache(cl_index key_size, cl_index cache_size);
36 extern ecl_cache_record_ptr ecl_search_cache(ecl_cache_ptr cache);
37 extern void ecl_cache_remove_one(ecl_cache_ptr cache, cl_object first_key);
38
39 #ifdef __cplusplus
40 }
41 #endif
42
43
44 #endif /* !ECL_CACHE_H */