mapleFU commented on code in PR #40094:
URL: https://github.com/apache/arrow/pull/40094#discussion_r1529749105
##########
cpp/src/arrow/util/byte_stream_split_internal.h:
##########
@@ -492,45 +501,94 @@ inline void DoMergeStreams(const uint8_t** src_streams,
int width, int64_t nvalu
}
template <int kNumStreams>
-void ByteStreamSplitEncodeScalar(const uint8_t* raw_values, const int64_t
num_values,
- uint8_t* output_buffer_raw) {
+void ByteStreamSplitEncodeScalar(const uint8_t* raw_values, int width,
+ const int64_t num_values, uint8_t* out) {
+ assert(width == kNumStreams);
std::array<uint8_t*, kNumStreams> dest_streams;
for (int stream = 0; stream < kNumStreams; ++stream) {
- dest_streams[stream] = &output_buffer_raw[stream * num_values];
+ dest_streams[stream] = &out[stream * num_values];
}
DoSplitStreams(raw_values, kNumStreams, num_values, dest_streams.data());
}
+inline void ByteStreamSplitEncodeScalarDynamic(const uint8_t* raw_values, int
width,
+ const int64_t num_values,
uint8_t* out) {
+ ::arrow::internal::SmallVector<uint8_t*, 16> dest_streams;
Review Comment:
Would this benifits performance?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]