1#ifndef TATAMI_CHUNKED_SLAB_CACHE_STATS_HPP
2#define TATAMI_CHUNKED_SLAB_CACHE_STATS_HPP
73 static size_t compute_max_slabs_in_cache(
size_t slab_size_in_elements,
size_t num_slabs,
size_t cache_size_in_elements,
bool require_minimum_cache) {
79 if (tmp == 0 && require_minimum_cache) {
83 return std::min(tmp, num_slabs);
Methods to handle chunked tatami matrices.
Definition ChunkDimensionStats.hpp:4
Statistics for regular chunks along a dimension.
Definition ChunkDimensionStats.hpp:35
Statistics for slab caching.
Definition SlabCacheStats.hpp:20
SlabCacheStats(size_t target_length, size_t non_target_length, size_t target_num_slabs, size_t cache_size_in_elements, bool require_minimum_cache)
Definition SlabCacheStats.hpp:43
SlabCacheStats(size_t target_length, size_t non_target_length, size_t target_num_slabs, size_t cache_size_in_bytes, size_t element_size, bool require_minimum_cache)
Definition SlabCacheStats.hpp:61
size_t max_slabs_in_cache
Definition SlabCacheStats.hpp:30
size_t slab_size_in_elements
Definition SlabCacheStats.hpp:24