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