-
-
Notifications
You must be signed in to change notification settings - Fork 150
/
shuffle.h
67 lines (54 loc) · 2.56 KB
/
shuffle.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*********************************************************************
Blosc - Blocked Shuffling and Compression Library
Author: Francesc Alted <francesc@blosc.org>
See LICENSES/BLOSC.txt for details about copyright and rights to use.
**********************************************************************/
/* Shuffle/unshuffle routines which dynamically dispatch to hardware-
accelerated routines based on the processor's architecture.
Consumers should almost always prefer to call these routines instead
of directly calling one of the hardware-accelerated routines, since
these are cross-platform and future-proof. */
#ifndef SHUFFLE_H
#define SHUFFLE_H
#include "blosc-common.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
Primary shuffle and bitshuffle routines.
This function dynamically dispatches to the appropriate hardware-accelerated
routine based on the host processor's architecture. If the host processor is
not supported by any of the hardware-accelerated routines, the generic
(non-accelerated) implementation is used instead.
Consumers should almost always prefer to call this routine instead of directly
calling the hardware-accelerated routines because this method is both cross-
platform and future-proof.
*/
BLOSC_NO_EXPORT void
blosc_internal_shuffle(const size_t bytesoftype, const size_t blocksize,
const uint8_t* _src, const uint8_t* _dest);
BLOSC_NO_EXPORT int
blosc_internal_bitshuffle(const size_t bytesoftype, const size_t blocksize,
const uint8_t* const _src, const uint8_t* _dest,
const uint8_t* _tmp);
/**
Primary unshuffle and bitunshuffle routine.
This function dynamically dispatches to the appropriate hardware-accelerated
routine based on the host processor's architecture. If the host processor is
not supported by any of the hardware-accelerated routines, the generic
(non-accelerated) implementation is used instead.
Consumers should almost always prefer to call this routine instead of directly
calling the hardware-accelerated routines because this method is both cross-
platform and future-proof.
*/
BLOSC_NO_EXPORT void
blosc_internal_unshuffle(const size_t bytesoftype, const size_t blocksize,
const uint8_t* _src, const uint8_t* _dest);
BLOSC_NO_EXPORT int
blosc_internal_bitunshuffle(const size_t bytesoftype, const size_t blocksize,
const uint8_t* const _src, const uint8_t* _dest,
const uint8_t* _tmp);
#ifdef __cplusplus
}
#endif
#endif /* SHUFFLE_H */