MCPcopy Create free account
hub / github.com/apache/arrow / unpack_jump

Function unpack_jump

cpp/src/arrow/util/bpacking_dispatch_internal.h:255–651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253
254template <template <typename, int> typename Unpacker, typename UnpackedUint>
255static void unpack_jump(const uint8_t* in, UnpackedUint* out, const UnpackOptions& opt) {
256 if constexpr (std::is_same_v<UnpackedUint, bool>) {
257 switch (opt.bit_width) {
258 case 0:
259 return unpack_width<0, Unpacker>(in, out, opt.batch_size, opt.bit_offset,
260 opt.max_read_bytes);
261 case 1:
262 return unpack_width<1, Unpacker>(in, out, opt.batch_size, opt.bit_offset,
263 opt.max_read_bytes);
264 }
265 } else if constexpr (sizeof(UnpackedUint) == 1) {
266 switch (opt.bit_width) {
267 case 0:
268 return unpack_width<0, Unpacker>(in, out, opt.batch_size, opt.bit_offset,
269 opt.max_read_bytes);
270 case 1:
271 return unpack_width<1, Unpacker>(in, out, opt.batch_size, opt.bit_offset,
272 opt.max_read_bytes);
273 case 2:
274 return unpack_width<2, Unpacker>(in, out, opt.batch_size, opt.bit_offset,
275 opt.max_read_bytes);
276 case 3:
277 return unpack_width<3, Unpacker>(in, out, opt.batch_size, opt.bit_offset,
278 opt.max_read_bytes);
279 case 4:
280 return unpack_width<4, Unpacker>(in, out, opt.batch_size, opt.bit_offset,
281 opt.max_read_bytes);
282 case 5:
283 return unpack_width<5, Unpacker>(in, out, opt.batch_size, opt.bit_offset,
284 opt.max_read_bytes);
285 case 6:
286 return unpack_width<6, Unpacker>(in, out, opt.batch_size, opt.bit_offset,
287 opt.max_read_bytes);
288 case 7:
289 return unpack_width<7, Unpacker>(in, out, opt.batch_size, opt.bit_offset,
290 opt.max_read_bytes);
291 case 8:
292 return unpack_width<8, Unpacker>(in, out, opt.batch_size, opt.bit_offset,
293 opt.max_read_bytes);
294 }
295 } else if constexpr (sizeof(UnpackedUint) == 2) {
296 switch (opt.bit_width) {
297 case 0:
298 return unpack_width<0, Unpacker>(in, out, opt.batch_size, opt.bit_offset,
299 opt.max_read_bytes);
300 case 1:
301 return unpack_width<1, Unpacker>(in, out, opt.batch_size, opt.bit_offset,
302 opt.max_read_bytes);
303 case 2:
304 return unpack_width<2, Unpacker>(in, out, opt.batch_size, opt.bit_offset,
305 opt.max_read_bytes);
306 case 3:
307 return unpack_width<3, Unpacker>(in, out, opt.batch_size, opt.bit_offset,
308 opt.max_read_bytes);
309 case 4:
310 return unpack_width<4, Unpacker>(in, out, opt.batch_size, opt.bit_offset,
311 opt.max_read_bytes);
312 case 5:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected