wpleonardo commented on code in PR #1375:
URL: https://github.com/apache/orc/pull/1375#discussion_r1169459884
##########
c++/src/RLEv2.hh:
##########
@@ -220,17 +221,36 @@ namespace orc {
const std::unique_ptr<SeekableInputStream> inputStream;
const bool isSigned;
-
unsigned char firstByte;
- uint64_t runLength; // Length of the current run
- uint64_t runRead; // Number of returned values of the current run
- const char* bufferStart;
- const char* bufferEnd;
- uint32_t bitsLeft; // Used by readLongs when bitSize < 8
- uint32_t curByte; // Used by anything that uses readLongs
+ uint64_t runLength; // Length of the current run
+ uint64_t runRead; // Number of returned values of the
current run
DataBuffer<int64_t> unpackedPatch; // Used by PATCHED_BASE
DataBuffer<int64_t> literals; // Values of the current run
};
+
+ inline void RleDecoderV2::resetBufferStart(char** bufStart, char** bufEnd,
uint64_t len,
Review Comment:
Fixed.
##########
c++/src/BpackingAvx512.hh:
##########
@@ -0,0 +1,103 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ORC_BPACKINGAVX512_HH
+#define ORC_BPACKINGAVX512_HH
+
+#include <cstdint>
+#include <cstdlib>
+
+#include "BpackingDefault.hh"
+
+namespace orc {
+
+#define VECTOR_UNPACK_8BIT_MAX_NUM 64
+#define VECTOR_UNPACK_16BIT_MAX_NUM 32
+#define VECTOR_UNPACK_32BIT_MAX_NUM 16
+#define UNPACK_8Bit_MAX_SIZE 8
+#define UNPACK_16Bit_MAX_SIZE 16
+#define UNPACK_32Bit_MAX_SIZE 32
+
+ class RleDecoderV2;
+
+ class UnpackAvx512 {
+ public:
+ UnpackAvx512(RleDecoderV2* dec);
+ ~UnpackAvx512();
+
+ void vectorUnpack1(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack2(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack3(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack4(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack5(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack6(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack7(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack9(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack10(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack11(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack12(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack13(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack14(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack15(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack16(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack17(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack18(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack19(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack20(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack21(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack22(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack23(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack24(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack26(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack28(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack30(int64_t* data, uint64_t offset, uint64_t len);
+ void vectorUnpack32(int64_t* data, uint64_t offset, uint64_t len);
+
+ void plainUnpackLongs(int64_t* data, uint64_t offset, uint64_t len,
uint64_t fbs,
+ uint64_t& startBit);
+
+ inline void alignHeaderBoundary(const uint32_t bitWidth, const uint32_t
bitMaxSize,
+ uint64_t& startBit, uint64_t&
bufMoveByteLen,
+ uint64_t& bufRestByteLen, uint64_t&
remainingNumElements,
+ uint64_t& tailBitLen, uint32_t&
backupByteLen,
+ uint64_t& numElements, bool& resetBuf,
const uint8_t*& srcPtr,
+ int64_t*& dstPtr);
+
+ inline void alignTailerBoundary(const uint32_t bitWidth, uint64_t&
startBit,
+ uint64_t& bufMoveByteLen, uint64_t&
bufRestByteLen,
+ uint64_t& remainingNumElements, uint32_t&
backupByteLen,
+ uint64_t& numElements, bool& resetBuf,
const uint8_t*& srcPtr,
+ int64_t*& dstPtr);
+
+ private:
+ RleDecoderV2* decoder;
+ UnpackDefault unpackDefault;
+
+ // Used by vectorially bit-unpacking data
Review Comment:
Fixed
--
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]