Skip to content

Commit

Permalink
avx2: apply BASE64_FORCE_INLINE macro
Browse files Browse the repository at this point in the history
  • Loading branch information
aklomp committed Jan 13, 2024
1 parent c19f146 commit 08fa9d8
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/arch/avx2/dec_loop.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
static inline int
BASE64_FORCE_INLINE int
dec_loop_avx2_inner (const uint8_t **s, uint8_t **o, size_t *rounds)
{
const __m256i lut_lo = _mm256_setr_epi8(
Expand Down Expand Up @@ -53,7 +53,7 @@ dec_loop_avx2_inner (const uint8_t **s, uint8_t **o, size_t *rounds)
return 1;
}

static inline void
BASE64_FORCE_INLINE void
dec_loop_avx2 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen)
{
if (*slen < 45) {
Expand Down
2 changes: 1 addition & 1 deletion lib/arch/avx2/dec_reshuffle.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
static inline __m256i
BASE64_FORCE_INLINE __m256i
dec_reshuffle (const __m256i in)
{
// in, lower lane, bits, upper case are most significant bits, lower
Expand Down
6 changes: 3 additions & 3 deletions lib/arch/avx2/enc_loop.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
static inline void
BASE64_FORCE_INLINE void
enc_loop_avx2_inner_first (const uint8_t **s, uint8_t **o)
{
// First load is done at s - 0 to not get a segfault:
Expand All @@ -17,7 +17,7 @@ enc_loop_avx2_inner_first (const uint8_t **s, uint8_t **o)
*o += 32;
}

static inline void
BASE64_FORCE_INLINE void
enc_loop_avx2_inner (const uint8_t **s, uint8_t **o)
{
// Load input:
Expand All @@ -32,7 +32,7 @@ enc_loop_avx2_inner (const uint8_t **s, uint8_t **o)
*o += 32;
}

static inline void
BASE64_FORCE_INLINE void
enc_loop_avx2 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen)
{
if (*slen < 32) {
Expand Down
2 changes: 1 addition & 1 deletion lib/arch/avx2/enc_loop_asm.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Woverlength-strings"

static inline void
BASE64_FORCE_INLINE void
enc_loop_avx2 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen)
{
// For a clearer explanation of the algorithm used by this function,
Expand Down
2 changes: 1 addition & 1 deletion lib/arch/avx2/enc_reshuffle.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
static inline __m256i
BASE64_FORCE_INLINE __m256i
enc_reshuffle (const __m256i input)
{
// Translation of the SSSE3 reshuffling algorithm to AVX2. This one
Expand Down
2 changes: 1 addition & 1 deletion lib/arch/avx2/enc_translate.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
static inline __m256i
BASE64_FORCE_INLINE __m256i
enc_translate (const __m256i in)
{
// A lookup table containing the absolute offsets for all ranges:
Expand Down

0 comments on commit 08fa9d8

Please sign in to comment.