Debian Codegraph @

src/c-blosc2/blosc/shuffle.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 /*********************************************************************
12 Shuffle/unshuffle routines which dynamically dispatch to hardware-
13 accelerated routines based on the processor's architecture.
14 Consumers should almost always prefer to call these routines instead
15 of directly calling one of the hardware-accelerated routines, since
16 these are cross-platform and future-proof.
17 **********************************************************************/
18
19 #ifndef BLOSC_SHUFFLE_H
20 #define BLOSC_SHUFFLE_H
21
22 #include "blosc2/blosc2-common.h"
23
24 #include <stdint.h>
25
26 /**
27 Primary shuffle and bitshuffle routines.
28 This function dynamically dispatches to the appropriate hardware-accelerated
29 routine based on the host processor's architecture. If the host processor is
30 not supported by any of the hardware-accelerated routines, the generic
31 (non-accelerated) implementation is used instead.
32 Consumers should almost always prefer to call this routine instead of directly
33 calling the hardware-accelerated routines because this method is both cross-
34 platform and future-proof.
35 */
36 BLOSC_NO_EXPORT void
37 shuffle(const int32_t bytesoftype, const int32_t blocksize,
38 const uint8_t* _src, uint8_t* _dest);
39
40 BLOSC_NO_EXPORT int32_t
41 bitshuffle(const int32_t bytesoftype, const int32_t blocksize,
42 const uint8_t *_src, uint8_t *_dest);
43
44 /**
45 Primary unshuffle and bitunshuffle routine.
46 This function dynamically dispatches to the appropriate hardware-accelerated
47 routine based on the host processor's architecture. If the host processor is
48 not supported by any of the hardware-accelerated routines, the generic
49 (non-accelerated) implementation is used instead.
50 Consumers should almost always prefer to call this routine instead of directly
51 calling the hardware-accelerated routines because this method is both cross-
52 platform and future-proof.
53 */
54 BLOSC_NO_EXPORT void
55 unshuffle(const int32_t bytesoftype, const int32_t blocksize,
56 const uint8_t* _src, uint8_t* _dest);
57
58
59 BLOSC_NO_EXPORT int32_t
60 bitunshuffle(const int32_t bytesoftype, const int32_t blocksize,
61 const uint8_t *_src, uint8_t *_dest,
62 const uint8_t format_version);
63
64 #endif /* BLOSC_SHUFFLE_H */