Debian Codegraph @

src/c-blosc2/blosc/stune.h

raw
1 /*********************************************************************
2 Blosc - Blocked Shuffling and Compression Library
3
4 Copyright (c) 2021 Blosc Development Team <[email protected]>
5 https://blosc.org
6 License: BSD 3-Clause (see LICENSE.txt)
7
8 See LICENSE.txt for details about copyright and rights to use.
9 **********************************************************************/
10
11 #ifndef BLOSC_STUNE_H
12 #define BLOSC_STUNE_H
13
14 #include "context.h"
15
16 #include <stdint.h>
17
18 /* The size of L1 cache. 32 KB is quite common nowadays. */
19 #define L1 (32 * 1024)
20 /* The size of L2 cache. 256 KB is quite common nowadays. */
21 #define L2 (256 * 1024)
22
23 /* The maximum number of compressed data streams in a block for compression */
24 #define MAX_STREAMS 16 /* Cannot be larger than 128 */
25
26 #define BLOSC_STUNE 0
27
28 int blosc_stune_init(void * config, blosc2_context* cctx, blosc2_context* dctx);
29
30 int blosc_stune_next_blocksize(blosc2_context * context);
31
32 int blosc_stune_next_cparams(blosc2_context * context);
33
34 int blosc_stune_update(blosc2_context * context, double ctime);
35
36 int blosc_stune_free(blosc2_context * context);
37
38 /* Conditions for splitting a block before compressing with a codec. */
39 int split_block(blosc2_context *context, int32_t typesize, int32_t blocksize);
40
41 #endif /* BLOSC_STUNE_H */