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:06 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:06 +0300
commitce2ad6f6a6f6025e37fb7f8debe7cefd3aa2307c (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/digest/argonish/internal/rotations
parent1ec091f8998d76a211c6015ba6865a73b29d676a (diff)
downloadydb-ce2ad6f6a6f6025e37fb7f8debe7cefd3aa2307c.tar.gz
Restoring authorship annotation for <e-sidorov@yandex-team.ru>. Commit 2 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 6d1910d34c..81cd171f59 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 82ffcae640..6f59e233a5 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 9af07b67f5..55a10a31b0 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 88669dc76a..39c9c5491b 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 b2b79b2b2a..5f639d4571 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()