atrstm_cache.h (1495B)
1 /* Copyright (C) 2022, 2023 |Méso|Star> (contact@meso-star.com) 2 * Copyright (C) 2020, 2021 Centre National de la Recherche Scientifique 3 * 4 * This program is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation, either version 3 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 16 17 #ifndef ATRSTM_CACHE_H 18 #define ATRSTM_CACHE_H 19 20 #include <rsys/rsys.h> 21 #include <stdio.h> 22 23 /* Cache of the acceleration data structures used to partition the optical 24 * properties of the semi transparent medium */ 25 struct cache; 26 27 extern LOCAL_SYM res_T 28 cache_create 29 (struct atrstm* atrstm, 30 const char* cache_name, 31 struct cache** cache); 32 33 extern LOCAL_SYM void 34 cache_ref_get 35 (struct cache* cache); 36 37 extern LOCAL_SYM void 38 cache_ref_put 39 (struct cache* cache); 40 41 extern LOCAL_SYM FILE* 42 cache_get_stream 43 (struct cache* cache); 44 45 extern LOCAL_SYM int 46 cache_is_empty 47 (const struct cache* cache); 48 49 extern LOCAL_SYM const char* 50 cache_get_name 51 (const struct cache* cache); 52 53 #endif /* ATRSTM_CACHE_H */