guyuqi commented on a change in pull request #9424:
URL: https://github.com/apache/arrow/pull/9424#discussion_r631587854



##########
File path: cpp/src/arrow/util/byte_stream_split.h
##########
@@ -23,25 +23,33 @@
 #include <stdint.h>
 #include <algorithm>
 
+#if defined(ARROW_HAVE_NEON) || defined(ARROW_HAVE_SSE4_2)
+#include <xsimd/xsimd.hpp>
+// Enable the SIMD for ByteStreamSplit Decoder
+#define ARROW_HAVE_SIMD_DECODE_SPLIT
+#endif
+
 #ifdef ARROW_HAVE_SSE4_2
-// Enable the SIMD for ByteStreamSplit Encoder/Decoder
-#define ARROW_HAVE_SIMD_SPLIT
+// Enable the SIMD for ByteStreamSplit Encoder
+#define ARROW_HAVE_SIMD_ENCODE_SPLIT
 #endif  // ARROW_HAVE_SSE4_2
 
 namespace arrow {
 namespace util {
 namespace internal {
 
-#if defined(ARROW_HAVE_SSE4_2)
+#ifdef ARROW_HAVE_SIMD_DECODE_SPLIT
 template <typename T>
-void ByteStreamSplitDecodeSse2(const uint8_t* data, int64_t num_values, 
int64_t stride,
-                               T* out) {
+void ByteStreamSplitDecode128bit(const uint8_t* data, int64_t num_values, 
int64_t stride,

Review comment:
       Agreed, updated

##########
File path: cpp/src/arrow/util/byte_stream_split.h
##########
@@ -23,25 +23,33 @@
 #include <stdint.h>
 #include <algorithm>
 
+#if defined(ARROW_HAVE_NEON) || defined(ARROW_HAVE_SSE4_2)
+#include <xsimd/xsimd.hpp>
+// Enable the SIMD for ByteStreamSplit Decoder
+#define ARROW_HAVE_SIMD_DECODE_SPLIT
+#endif
+
 #ifdef ARROW_HAVE_SSE4_2
-// Enable the SIMD for ByteStreamSplit Encoder/Decoder
-#define ARROW_HAVE_SIMD_SPLIT
+// Enable the SIMD for ByteStreamSplit Encoder
+#define ARROW_HAVE_SIMD_ENCODE_SPLIT
 #endif  // ARROW_HAVE_SSE4_2
 
 namespace arrow {
 namespace util {
 namespace internal {
 
-#if defined(ARROW_HAVE_SSE4_2)
+#ifdef ARROW_HAVE_SIMD_DECODE_SPLIT
 template <typename T>
-void ByteStreamSplitDecodeSse2(const uint8_t* data, int64_t num_values, 
int64_t stride,
-                               T* out) {
+void ByteStreamSplitDecode128bit(const uint8_t* data, int64_t num_values, 
int64_t stride,
+                                 T* out) {
+  using simd_batch = xsimd::batch<int8_t, 16>;
+  constexpr size_t dTypeSize128bits = sizeof(int8_t) * 16;

Review comment:
       Updated, thanks.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to