aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/digest/argonish/internal/rotations
diff options
context:
space:
mode:
authore-sidorov <e-sidorov@yandex-team.ru>2022-02-10 16:46:05 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:05 +0300
commit1ec091f8998d76a211c6015ba6865a73b29d676a (patch)
tree6c72f0309888be2dd18d007d19c490ed87740d66 /library/cpp/digest/argonish/internal/rotations
parent3b241dd57cf58f20bbbd63fa6a0a758dbec09b68 (diff)
downloadydb-1ec091f8998d76a211c6015ba6865a73b29d676a.tar.gz
Restoring authorship annotation for <e-sidorov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/digest/argonish/internal/rotations')
-rw-r--r--library/cpp/digest/argonish/internal/rotations/rotations_avx2.h60
-rw-r--r--library/cpp/digest/argonish/internal/rotations/rotations_ref.h14
-rw-r--r--library/cpp/digest/argonish/internal/rotations/rotations_sse2.h54
-rw-r--r--library/cpp/digest/argonish/internal/rotations/rotations_ssse3.h56
-rw-r--r--library/cpp/digest/argonish/internal/rotations/ya.make10
5 files changed, 97 insertions, 97 deletions
diff --git a/library/cpp/digest/argonish/internal/rotations/rotations_avx2.h b/library/cpp/digest/argonish/internal/rotations/rotations_avx2.h
index 81cd171f59..6d1910d34c 100644
--- a/library/cpp/digest/argonish/internal/rotations/rotations_avx2.h
+++ b/library/cpp/digest/argonish/internal/rotations/rotations_avx2.h
@@ -1,30 +1,30 @@
-#pragma once
-
-#include <immintrin.h>
-
-namespace NArgonish {
- static inline void XorValues(__m256i* result, const __m256i* val1, const __m256i* val2) {
- _mm256_storeu_si256(result, _mm256_xor_si256(
- _mm256_loadu_si256(val1), _mm256_loadu_si256(val2)));
- }
-
- static inline __m256i Rotr32(__m256i x) {
- return _mm256_shuffle_epi32(x, _MM_SHUFFLE(2, 3, 0, 1));
- }
-
- static inline __m256i Rotr24(__m256i x) {
- return _mm256_shuffle_epi8(x, _mm256_setr_epi8(
- 3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10,
- 3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10));
- }
-
- static inline __m256i Rotr16(__m256i x) {
- return _mm256_shuffle_epi8(x, _mm256_setr_epi8(
- 2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9,
- 2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9));
- }
-
- static inline __m256i Rotr63(__m256i x) {
- return _mm256_xor_si256(_mm256_srli_epi64(x, 63), _mm256_add_epi64(x, x));
- }
-}
+#pragma once
+
+#include <immintrin.h>
+
+namespace NArgonish {
+ static inline void XorValues(__m256i* result, const __m256i* val1, const __m256i* val2) {
+ _mm256_storeu_si256(result, _mm256_xor_si256(
+ _mm256_loadu_si256(val1), _mm256_loadu_si256(val2)));
+ }
+
+ static inline __m256i Rotr32(__m256i x) {
+ return _mm256_shuffle_epi32(x, _MM_SHUFFLE(2, 3, 0, 1));
+ }
+
+ static inline __m256i Rotr24(__m256i x) {
+ return _mm256_shuffle_epi8(x, _mm256_setr_epi8(
+ 3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10,
+ 3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10));
+ }
+
+ static inline __m256i Rotr16(__m256i x) {
+ return _mm256_shuffle_epi8(x, _mm256_setr_epi8(
+ 2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9,
+ 2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9));
+ }
+
+ static inline __m256i Rotr63(__m256i x) {
+ return _mm256_xor_si256(_mm256_srli_epi64(x, 63), _mm256_add_epi64(x, x));
+ }
+}
diff --git a/library/cpp/digest/argonish/internal/rotations/rotations_ref.h b/library/cpp/digest/argonish/internal/rotations/rotations_ref.h
index 6f59e233a5..82ffcae640 100644
--- a/library/cpp/digest/argonish/internal/rotations/rotations_ref.h
+++ b/library/cpp/digest/argonish/internal/rotations/rotations_ref.h
@@ -1,7 +1,7 @@
-#pragma once
-
-namespace NArgonish {
- static inline ui64 Rotr(const ui64 w, const unsigned c) {
- return (w >> c) | (w << (64 - c));
- }
-}
+#pragma once
+
+namespace NArgonish {
+ static inline ui64 Rotr(const ui64 w, const unsigned c) {
+ return (w >> c) | (w << (64 - c));
+ }
+}
diff --git a/library/cpp/digest/argonish/internal/rotations/rotations_sse2.h b/library/cpp/digest/argonish/internal/rotations/rotations_sse2.h
index 55a10a31b0..9af07b67f5 100644
--- a/library/cpp/digest/argonish/internal/rotations/rotations_sse2.h
+++ b/library/cpp/digest/argonish/internal/rotations/rotations_sse2.h
@@ -1,27 +1,27 @@
-#pragma once
-
-#include <emmintrin.h>
-
-namespace NArgonish {
- static inline void XorValues(__m128i* result, const __m128i* val1, const __m128i* val2) {
- _mm_storeu_si128(result, _mm_xor_si128(
- _mm_loadu_si128(val1),
- _mm_loadu_si128(val2)));
- }
-
- static inline __m128i Rotr32(__m128i x) {
- return _mm_shuffle_epi32(x, _MM_SHUFFLE(2, 3, 0, 1));
- }
-
- static inline __m128i Rotr24(__m128i x) {
- return _mm_xor_si128(_mm_srli_epi64(x, 24), _mm_slli_epi64(x, 40));
- }
-
- static inline __m128i Rotr16(__m128i x) {
- return _mm_xor_si128(_mm_srli_epi64(x, 16), _mm_slli_epi64(x, 48));
- }
-
- static inline __m128i Rotr63(__m128i x) {
- return _mm_xor_si128(_mm_srli_epi64(x, 63), _mm_add_epi64(x, x));
- }
-}
+#pragma once
+
+#include <emmintrin.h>
+
+namespace NArgonish {
+ static inline void XorValues(__m128i* result, const __m128i* val1, const __m128i* val2) {
+ _mm_storeu_si128(result, _mm_xor_si128(
+ _mm_loadu_si128(val1),
+ _mm_loadu_si128(val2)));
+ }
+
+ static inline __m128i Rotr32(__m128i x) {
+ return _mm_shuffle_epi32(x, _MM_SHUFFLE(2, 3, 0, 1));
+ }
+
+ static inline __m128i Rotr24(__m128i x) {
+ return _mm_xor_si128(_mm_srli_epi64(x, 24), _mm_slli_epi64(x, 40));
+ }
+
+ static inline __m128i Rotr16(__m128i x) {
+ return _mm_xor_si128(_mm_srli_epi64(x, 16), _mm_slli_epi64(x, 48));
+ }
+
+ static inline __m128i Rotr63(__m128i x) {
+ return _mm_xor_si128(_mm_srli_epi64(x, 63), _mm_add_epi64(x, x));
+ }
+}
diff --git a/library/cpp/digest/argonish/internal/rotations/rotations_ssse3.h b/library/cpp/digest/argonish/internal/rotations/rotations_ssse3.h
index 39c9c5491b..88669dc76a 100644
--- a/library/cpp/digest/argonish/internal/rotations/rotations_ssse3.h
+++ b/library/cpp/digest/argonish/internal/rotations/rotations_ssse3.h
@@ -1,28 +1,28 @@
-#pragma once
-
-#include <emmintrin.h>
-#include <tmmintrin.h>
-
-namespace NArgonish {
- static inline void XorValues(__m128i* result, __m128i* val1, __m128i* val2) {
- _mm_storeu_si128(result, _mm_xor_si128(
- _mm_loadu_si128(val1),
- _mm_loadu_si128(val2)));
- }
-
- static inline __m128i Rotr32(__m128i x) {
- return _mm_shuffle_epi32(x, _MM_SHUFFLE(2, 3, 0, 1));
- }
-
- static inline __m128i Rotr24(__m128i x) {
- return _mm_shuffle_epi8(x, _mm_setr_epi8(3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10));
- }
-
- static inline __m128i Rotr16(__m128i x) {
- return _mm_shuffle_epi8(x, _mm_setr_epi8(2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9));
- }
-
- static inline __m128i Rotr63(__m128i x) {
- return _mm_xor_si128(_mm_srli_epi64(x, 63), _mm_add_epi64(x, x));
- }
-}
+#pragma once
+
+#include <emmintrin.h>
+#include <tmmintrin.h>
+
+namespace NArgonish {
+ static inline void XorValues(__m128i* result, __m128i* val1, __m128i* val2) {
+ _mm_storeu_si128(result, _mm_xor_si128(
+ _mm_loadu_si128(val1),
+ _mm_loadu_si128(val2)));
+ }
+
+ static inline __m128i Rotr32(__m128i x) {
+ return _mm_shuffle_epi32(x, _MM_SHUFFLE(2, 3, 0, 1));
+ }
+
+ static inline __m128i Rotr24(__m128i x) {
+ return _mm_shuffle_epi8(x, _mm_setr_epi8(3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10));
+ }
+
+ static inline __m128i Rotr16(__m128i x) {
+ return _mm_shuffle_epi8(x, _mm_setr_epi8(2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9));
+ }
+
+ static inline __m128i Rotr63(__m128i x) {
+ return _mm_xor_si128(_mm_srli_epi64(x, 63), _mm_add_epi64(x, x));
+ }
+}
diff --git a/library/cpp/digest/argonish/internal/rotations/ya.make b/library/cpp/digest/argonish/internal/rotations/ya.make
index 5f639d4571..b2b79b2b2a 100644
--- a/library/cpp/digest/argonish/internal/rotations/ya.make
+++ b/library/cpp/digest/argonish/internal/rotations/ya.make
@@ -1,5 +1,5 @@
-LIBRARY()
-
-OWNER(e-sidorov)
-
-END()
+LIBRARY()
+
+OWNER(e-sidorov)
+
+END()