• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <stdint.h>
2 #include <stddef.h>
3 #include <stdlib.h>
4 
5 #include "../../../include/libbase64.h"
6 #include "../../tables/tables.h"
7 #include "../../codecs.h"
8 #include "config.h"
9 #include "../../env.h"
10 
11 #if HAVE_AVX512
12 #include <immintrin.h>
13 
14 #include "../avx2/dec_reshuffle.c"
15 #include "../avx2/dec_loop.c"
16 #include "enc_reshuffle_translate.c"
17 #include "enc_loop.c"
18 
19 #endif	// HAVE_AVX512
20 
BASE64_ENC_FUNCTION(avx512)21 BASE64_ENC_FUNCTION(avx512)
22 {
23 #if HAVE_AVX512
24 	#include "../generic/enc_head.c"
25 	enc_loop_avx512(&s, &slen, &o, &olen);
26 	#include "../generic/enc_tail.c"
27 #else
28 	BASE64_ENC_STUB
29 #endif
30 }
31 
32 // Reuse AVX2 decoding. Not supporting AVX512 at present
BASE64_DEC_FUNCTION(avx512)33 BASE64_DEC_FUNCTION(avx512)
34 {
35 #if HAVE_AVX512
36 	#include "../generic/dec_head.c"
37 	dec_loop_avx2(&s, &slen, &o, &olen);
38 	#include "../generic/dec_tail.c"
39 #else
40 	BASE64_DEC_STUB
41 #endif
42 }
43