Youwei Wang has posted comments on this change. Change subject: IMPALA-2809: improve ByteSwap with builtin function or SSE or AVX2 ......................................................................
Patch Set 3: (3 comments) The next patch focuses on "be/src/util/bit-util.inline.h ". The refractoring of bswap-benchmark may take some time. Please review the "be/src/util/bit-util.inline.h" first. Thank you. http://gerrit.cloudera.org:8080/#/c/3081/3/be/src/util/bit-util.inline.h File be/src/util/bit-util.inline.h: Line 140: const __m128i mask = _mm_set_epi8(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, > It might, but it also might create a conditional at the beginning of the fu Maybe I haven't explained it clearly enough. The __attribute__ only works for functions, which means something like: //global variable declaration __attribute__((target("sse4.2"))) const __m128i mask = _mm_set_epi8(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,..); can't compile. In other words, if we don't change the compile configuration, such initalizer should be only wrapped in a function since it has code like _mm_set_epi8/_mm256_set_epi8. So this is the issue - I am not sure whether using macros can solve this since the conditional compilation can't handle this. If I don't get your idea correctly, could you please give me some simple pseudocode? Thank you. Line 168: __int128_t part1 = *reinterpret_cast<__int128_t*>(dst); > This doesn't look done. Did you forget to upload the new version? Hi Jim. The code of the patch is almost done. Since there are still discussion going on here, I want to resolve them all and then upload the fixed code. I can upload a version without the refraction of bswap-benchmark.cc for your review first. Line 189: if(len >= 32){ > I'm not sure I agree with you. It checks the lengthand calls ByteSwapScalar I got your idea. Done -- To view, visit http://gerrit.cloudera.org:8080/3081 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I392ed5a8d5683f30f161282c228c1aedd7b648c1 Gerrit-PatchSet: 3 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Youwei Wang <[email protected]> Gerrit-Reviewer: Alex Behm <[email protected]> Gerrit-Reviewer: Jim Apple <[email protected]> Gerrit-Reviewer: Marcel Kornacker <[email protected]> Gerrit-Reviewer: Mostafa Mokhtar <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-Reviewer: Youwei Wang <[email protected]> Gerrit-HasComments: Yes
