sdis_estimator_buffer_c.h (2596B)
1 /* Copyright (C) 2016-2025 |Méso|Star> (contact@meso-star.com) 2 * 3 * This program is free software: you can redistribute it and/or modify 4 * it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 3 of the License, or 6 * (at your option) any later version. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details. 12 * 13 * You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 15 16 #ifndef SDIS_ESTIMATOR_BUFFER_C_H 17 #define SDIS_ESTIMATOR_BUFFER_C_H 18 19 #include <rsys/rsys.h> 20 21 /* Forward declaration */ 22 struct sdis_device; 23 struct sdis_estimator; 24 struct sdis_estimator_buffer; 25 26 extern LOCAL_SYM res_T 27 estimator_buffer_create 28 (struct sdis_device* dev, 29 const size_t width, 30 const size_t height, 31 struct sdis_estimator_buffer** buf); 32 33 extern LOCAL_SYM struct sdis_estimator* 34 estimator_buffer_grab 35 (const struct sdis_estimator_buffer* buf, 36 const size_t x, 37 const size_t y); 38 39 extern LOCAL_SYM void 40 estimator_buffer_setup_realisations_count 41 (struct sdis_estimator_buffer* buf, 42 const size_t nrealisations, 43 const size_t nsuccesses); 44 45 extern LOCAL_SYM void 46 estimator_buffer_setup_temperature 47 (struct sdis_estimator_buffer* buf, 48 const double sum, 49 const double sum2); 50 51 extern LOCAL_SYM void 52 estimator_buffer_setup_realisation_time 53 (struct sdis_estimator_buffer* buf, 54 const double sum, 55 const double sum2); 56 57 extern LOCAL_SYM res_T 58 estimator_buffer_save_rng_state 59 (struct sdis_estimator_buffer* buf, 60 const struct ssp_rng_proxy* proxy); 61 62 extern LOCAL_SYM res_T 63 estimator_buffer_create_from_observable_list_probe 64 (struct sdis_device* dev, 65 struct ssp_rng_proxy* rng_proxy, 66 const struct sdis_solve_probe_args obs_list_args[], 67 const struct accum* per_obs_acc_temp, 68 const struct accum* per_obs_acc_time, 69 const size_t nobs, /* #observables */ 70 struct sdis_estimator_buffer** out_estim_buffer); 71 72 extern LOCAL_SYM res_T 73 estimator_buffer_create_from_observable_list_probe_boundary 74 (struct sdis_device* dev, 75 struct ssp_rng_proxy* rng_proxy, 76 const struct sdis_solve_probe_boundary_args obs_list_args[], 77 const struct accum* per_obs_acc_temp, 78 const struct accum* per_obs_acc_time, 79 const size_t nobs, /* #observables */ 80 struct sdis_estimator_buffer** out_estim_buffer); 81 82 #endif /* SDIS_ESTIMATOR_BUFFER_C_H */ 83