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

Function CastIntsInternal

cpp/src/arrow/util/int_util.cc:370–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368
369template <typename Source, typename Dest>
370static inline void CastIntsInternal(const Source* src, Dest* dest, int64_t length) {
371 while (length >= 4) {
372 dest[0] = static_cast<Dest>(src[0]);
373 dest[1] = static_cast<Dest>(src[1]);
374 dest[2] = static_cast<Dest>(src[2]);
375 dest[3] = static_cast<Dest>(src[3]);
376 length -= 4;
377 src += 4;
378 dest += 4;
379 }
380 while (length > 0) {
381 *dest++ = static_cast<Dest>(*src++);
382 --length;
383 }
384}
385
386void DowncastInts(const int64_t* source, int8_t* dest, int64_t length) {
387 CastIntsInternal(source, dest, length);

Callers 3

DowncastIntsFunction · 0.85
DowncastUIntsFunction · 0.85
UpcastIntsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected