blob: 80f097ae8009c8ea110ddda17e5a5e6aa89ae8b5 (
plain) (
blame)
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
|
#if defined(__GNUC__) && defined(__x86_64__) && defined(__AVX2__)
#ifndef EXPAVX_B64
#define EXPAVX_B64
/**
* Assumes recent x64 hardware with AVX2 instructions.
*/
#include "chromiumbase64.h"
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/**
* This code extends Nick Galbreath's high performance base 64decoder (used in
* Chromium), the API is the same effectively, see chromium64.h.
*/
/*
* AVX2 accelerated version of Galbreath's chromium_base64_decode function
* Usage remains the same, see chromium.h.
*/
size_t fast_avx2_base64_decode(char *out, const char *src, size_t srclen,
size_t *outlen);
/*
* AVX2 accelerated version of Galbreath's chromium_base64_encode function
* Usage remains the same, see chromium.h.
*/
size_t fast_avx2_base64_encode(char *dest, const char *str, size_t len);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif
|