1 | #include <stdint.h> |
---|---|
2 | #include <stddef.h> |
3 | #include <stdlib.h> |
4 | |
5 | #include "../../../include/libbase64.h" |
6 | #include "../../codecs.h" |
7 | |
8 | #if HAVE_AVX2 |
9 | #include <immintrin.h> |
10 | |
11 | #include "dec_reshuffle.c" |
12 | #include "dec_loop.c" |
13 | #include "enc_translate.c" |
14 | #include "enc_reshuffle.c" |
15 | #include "enc_loop.c" |
16 | |
17 | #endif // HAVE_AVX2 |
18 | |
19 | BASE64_ENC_FUNCTION(avx2) |
20 | { |
21 | #if HAVE_AVX2 |
22 | #include "../generic/enc_head.c" |
23 | enc_loop_avx2(&s, &slen, &o, &olen); |
24 | #include "../generic/enc_tail.c" |
25 | #else |
26 | BASE64_ENC_STUB |
27 | #endif |
28 | } |
29 | |
30 | BASE64_DEC_FUNCTION(avx2) |
31 | { |
32 | #if HAVE_AVX2 |
33 | #include "../generic/dec_head.c" |
34 | dec_loop_avx2(&s, &slen, &o, &olen); |
35 | #include "../generic/dec_tail.c" |
36 | #else |
37 | BASE64_DEC_STUB |
38 | #endif |
39 | } |
40 |