MCPcopy Create free account
hub / github.com/ElementsProject/elements / Read4

Function Read4

src/crypto/sha256_sse41.cpp:47–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47__m128i inline Read4(const unsigned char* chunk, int offset) {
48 __m128i ret = _mm_set_epi32(
49 ReadLE32(chunk + 0 + offset),
50 ReadLE32(chunk + 64 + offset),
51 ReadLE32(chunk + 128 + offset),
52 ReadLE32(chunk + 192 + offset)
53 );
54 return _mm_shuffle_epi8(ret, _mm_set_epi32(0x0C0D0E0FUL, 0x08090A0BUL, 0x04050607UL, 0x00010203UL));
55}
56
57void inline Write4(unsigned char* out, int offset, __m128i v) {
58 v = _mm_shuffle_epi8(v, _mm_set_epi32(0x0C0D0E0FUL, 0x08090A0BUL, 0x04050607UL, 0x00010203UL));

Callers 1

Transform_4wayFunction · 0.85

Calls 1

ReadLE32Function · 0.85

Tested by

no test coverage detected