atrstm

Load and structure a combustion gas mixture
git clone git://git.meso-star.fr/atrstm.git
Log | Files | Refs | README | LICENSE

commit a2c450185a4051a622e572b9398989c2712c739d
parent f8454574d3116230c7b82ff64ce78fe2f12363a2
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Tue, 29 Jun 2021 10:46:32 +0200

Setup the cache wrt the use_simd flag

Diffstat:
Msrc/atrstm_cache.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/atrstm_cache.c b/src/atrstm_cache.c @@ -53,7 +53,7 @@ struct hash { /* Current version the cache memory layout. One should increment it and perform * a version management onto serialized data when the cache data structure is * updated. */ -static const int CACHE_VERSION = 0; +static const int CACHE_VERSION = 1; /******************************************************************************* * Helper functions @@ -169,6 +169,7 @@ write_cache_header(struct cache* cache) WRITE(cache->atrstm->wlen_range, 2); WRITE(cache->atrstm->grid_max_definition, 3); WRITE(&cache->atrstm->optical_thickness, 1); + WRITE(&cache->atrstm->use_simd, 1); #undef WRITE res = hash_compute(cache->atrstm, &hash); @@ -193,6 +194,7 @@ read_cache_header(struct cache* cache) double wlen_range[2] = {0,0}; unsigned grid_max_definition[3] = {0,0,0}; double optical_thickness = 0; + int use_simd = 0; int cache_version = 0; res_T res = RES_OK; ASSERT(cache); @@ -262,6 +264,9 @@ read_cache_header(struct cache* cache) CHK_VAR(optical_thickness, cache->atrstm->optical_thickness, "optical thickness", "%g"); + READ(&use_simd, 1); + CHK_VAR(use_simd, cache->atrstm->use_simd, "use_simd flag", "%i"); + #undef CHK_VAR res = hash_read(&cached_hash, cache->stream);