aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/base64/neon64/codecs.h
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:46 +0300
commit8cbc307de0221f84c80c42dcbe07d40727537e2c (patch)
tree625d5a673015d1df891e051033e9fcde5c7be4e5 /contrib/libs/base64/neon64/codecs.h
parent30d1ef3941e0dc835be7609de5ebee66958f215a (diff)
downloadydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/base64/neon64/codecs.h')
-rw-r--r--contrib/libs/base64/neon64/codecs.h70
1 files changed, 35 insertions, 35 deletions
diff --git a/contrib/libs/base64/neon64/codecs.h b/contrib/libs/base64/neon64/codecs.h
index d97269a4a5..0b8138c5bb 100644
--- a/contrib/libs/base64/neon64/codecs.h
+++ b/contrib/libs/base64/neon64/codecs.h
@@ -1,35 +1,35 @@
-#pragma once
-
-// Define machine endianness. This is for GCC:
-#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
- #define BASE64_NEON64_LITTLE_ENDIAN 1
-#else
- #define BASE64_NEON64_LITTLE_ENDIAN 0
-#endif
-
-// This is for Clang:
-#ifdef __LITTLE_ENDIAN__
- #define BASE64_NEON64_LITTLE_ENDIAN 1
-#endif
-
-#ifdef __BIG_ENDIAN__
- #define BASE64_NEON64_LITTLE_ENDIAN 0
-#endif
-
-// Endian conversion functions
-#if BASE64_NEON64_LITTLE_ENDIAN
- #define cpu_to_be32(x) __builtin_bswap32(x)
- #define cpu_to_be64(x) __builtin_bswap64(x)
- #define be32_to_cpu(x) __builtin_bswap32(x)
- #define be64_to_cpu(x) __builtin_bswap64(x)
-#else
- #define cpu_to_be32(x) (x)
- #define cpu_to_be64(x) (x)
- #define be32_to_cpu(x) (x)
- #define be64_to_cpu(x) (x)
-#endif
-
-// These tables are used by all codecs
-// for fallback plain encoding/decoding:
-extern const uint8_t neon64_base64_table_enc[];
-extern const uint8_t neon64_base64_table_dec[];
+#pragma once
+
+// Define machine endianness. This is for GCC:
+#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
+ #define BASE64_NEON64_LITTLE_ENDIAN 1
+#else
+ #define BASE64_NEON64_LITTLE_ENDIAN 0
+#endif
+
+// This is for Clang:
+#ifdef __LITTLE_ENDIAN__
+ #define BASE64_NEON64_LITTLE_ENDIAN 1
+#endif
+
+#ifdef __BIG_ENDIAN__
+ #define BASE64_NEON64_LITTLE_ENDIAN 0
+#endif
+
+// Endian conversion functions
+#if BASE64_NEON64_LITTLE_ENDIAN
+ #define cpu_to_be32(x) __builtin_bswap32(x)
+ #define cpu_to_be64(x) __builtin_bswap64(x)
+ #define be32_to_cpu(x) __builtin_bswap32(x)
+ #define be64_to_cpu(x) __builtin_bswap64(x)
+#else
+ #define cpu_to_be32(x) (x)
+ #define cpu_to_be64(x) (x)
+ #define be32_to_cpu(x) (x)
+ #define be64_to_cpu(x) (x)
+#endif
+
+// These tables are used by all codecs
+// for fallback plain encoding/decoding:
+extern const uint8_t neon64_base64_table_enc[];
+extern const uint8_t neon64_base64_table_dec[];