@Override public void copy(long compoundAddr, final int srcStart, final int count) { copyWatch.start(); final long[] dstAddrs = this.dstAddrs; long srcAddr = source.getDataBufferAddress() + srcStart * SIZE; final long max = compoundAddr + count * OFFSET_SIZE; for (; compoundAddr < max; compoundAddr +=OFFSET_SIZE, srcAddr += SIZE) { final int compoundIdx = PlatformDependent.getInt(compoundAddr); final int batchIdx = compoundIdx >>> 16; final int rowIdx = compoundIdx & 65535; PlatformDependent.putLong(dstAddrs[batchIdx] + rowIdx * SIZE, PlatformDependent.getLong(srcAddr)); } copyWatch.stop(); } }
@Override public void copy(long compoundAddr, final int srcStart, final int count) { copyWatch.start(); final long[] dstAddrs = this.dstAddrs; // compute address of first copied value long srcAddr = source.getDataBufferAddress() + srcStart * SIZE; final long max = compoundAddr + count * OFFSET_SIZE; for (; compoundAddr < max; compoundAddr +=OFFSET_SIZE, srcAddr += SIZE) { final int compoundIdx = PlatformDependent.getInt(compoundAddr); final int batchIdx = compoundIdx >>> 16; final int rowIdx = compoundIdx & 65535; PlatformDependent.putInt(dstAddrs[batchIdx] + rowIdx * SIZE, PlatformDependent.getInt(srcAddr)); } copyWatch.stop(); } }
@Override public void copy(long offsetAddr, int count) { targetAlt.allocateNew(count); final long max = offsetAddr + count * STEP_SIZE; long srcAddr = source.getDataBufferAddress(); long dstAddr = target.getDataBufferAddress(); for(long addr = offsetAddr; addr < max; addr += STEP_SIZE, dstAddr += SIZE){ PlatformDependent.putLong(dstAddr, PlatformDependent.getLong(srcAddr + Short.toUnsignedInt(PlatformDependent.getShort(addr)) * SIZE)); } }
@Override public void copy(long offsetAddr, int count) { targetAlt.allocateNew(count); final long max = offsetAddr + count * STEP_SIZE; final long srcAddr = source.getDataBufferAddress(); long dstAddr = target.getDataBufferAddress(); for(long addr = offsetAddr; addr < max; addr += STEP_SIZE, dstAddr += SIZE){ PlatformDependent.putInt(dstAddr, PlatformDependent.getInt(srcAddr + Short.toUnsignedInt(PlatformDependent.getShort(addr)) * SIZE)); } }
@Override public void copy(long offsetAddr, int count) { targetAlt.allocateNew(count); final long max = offsetAddr + count * STEP_SIZE; final long srcAddr = source.getDataBufferAddress(); long dstAddr = target.getDataBufferAddress(); for(long addr = offsetAddr; addr < max; addr += STEP_SIZE, dstAddr += SIZE){ final int offset = Short.toUnsignedInt(PlatformDependent.getShort(addr)) * SIZE; PlatformDependent.putLong(dstAddr, PlatformDependent.getLong(srcAddr + offset)); PlatformDependent.putLong(dstAddr+8, PlatformDependent.getLong(srcAddr + + offset + 8)); } }
@Override public void copy(long compoundAddr, final int srcStart, final int count) { copyWatch.start(); final long[] dstAddrs = this.dstAddrs; long srcAddr = source.getDataBufferAddress() + srcStart * SIZE; final long max = compoundAddr + count * OFFSET_SIZE; for (; compoundAddr < max; compoundAddr +=OFFSET_SIZE, srcAddr += SIZE) { final int compoundIdx = PlatformDependent.getInt(compoundAddr); final int batchIdx = compoundIdx >>> 16; final int rowIdx = compoundIdx & 65535; final long dstAddr = dstAddrs[batchIdx] + rowIdx * SIZE; PlatformDependent.putLong(dstAddr, PlatformDependent.getLong(srcAddr)); PlatformDependent.putLong(dstAddr + 8, PlatformDependent.getLong(srcAddr + 8)); } copyWatch.stop(); } }
@Override public void copy(long offsetAddr, int count) { targetAlt.allocateNew(count); final long max = offsetAddr + count * STEP_SIZE; final long[] srcAddrs = this.srcAddrs; long dstAddr = target.getDataBufferAddress(); for(long addr = offsetAddr; addr < max; addr += STEP_SIZE, dstAddr += SIZE){ final int sv4 = PlatformDependent.getInt(addr); PlatformDependent.putLong(dstAddr, PlatformDependent.getLong(srcAddrs[sv4 >>> BATCH_BITS] + (sv4 & MAX_BATCH) * SIZE)); } }
@Override public void copy(long offsetAddr, int count) { targetAlt.allocateNew(count); final long max = offsetAddr + count * STEP_SIZE; final long[] srcAddrs = this.srcAddrs; long dstAddr = target.getDataBufferAddress(); for(long addr = offsetAddr; addr < max; addr += STEP_SIZE, dstAddr += SIZE){ final int sv4 = PlatformDependent.getInt(addr); PlatformDependent.putInt(dstAddr, PlatformDependent.getInt(srcAddrs[sv4 >>> BATCH_BITS] + (sv4 & MAX_BATCH) * SIZE)); } }
public void accumulate(final long memoryAddr, final int count) { final long maxAddr = memoryAddr + count * 4; final long incomingBit = getInput().getValidityBufferAddress(); final long incomingValue = getInput().getDataBufferAddress(); final long[] valueAddresses = this.valueAddresses; int incomingIndex = 0; for(long ordinalAddr = memoryAddr; ordinalAddr < maxAddr; ordinalAddr += 4, incomingIndex++){ final int bitVal = (PlatformDependent.getByte(incomingBit + ((incomingIndex >>> 3))) >>> (incomingIndex & 7)) & 1; final float newVal = Float.intBitsToFloat(PlatformDependent.getInt(incomingValue + (incomingIndex * WIDTH)) * bitVal); final int tableIndex = PlatformDependent.getInt(ordinalAddr); final long sumAddr = valueAddresses[tableIndex >>> LBlockHashTableNoSpill.BITS_IN_CHUNK] + (tableIndex & LBlockHashTableNoSpill.CHUNK_OFFSET_MASK) * 8; PlatformDependent.putLong(sumAddr, Double.doubleToLongBits(Double.longBitsToDouble(PlatformDependent.getLong(sumAddr)) + newVal)); } } }
public void accumulate(final long memoryAddr, final int count) { final long maxAddr = memoryAddr + count * 4; final long incomingBit = getInput().getValidityBufferAddress(); final long incomingValue = getInput().getDataBufferAddress(); final long[] valueAddresses = this.valueAddresses; int incomingIndex = 0; for(long ordinalAddr = memoryAddr; ordinalAddr < maxAddr; ordinalAddr += 4, incomingIndex++){ final int bitVal = (PlatformDependent.getByte(incomingBit + ((incomingIndex >>> 3))) >>> (incomingIndex & 7)) & 1; final double newVal = Double.longBitsToDouble(PlatformDependent.getLong(incomingValue + (incomingIndex * WIDTH)) * bitVal); final int tableIndex = PlatformDependent.getInt(ordinalAddr); final long sumAddr = valueAddresses[tableIndex >>> LBlockHashTableNoSpill.BITS_IN_CHUNK] + (tableIndex & LBlockHashTableNoSpill.CHUNK_OFFSET_MASK) * 8; PlatformDependent.putLong(sumAddr, Double.doubleToLongBits(Double.longBitsToDouble(PlatformDependent.getLong(sumAddr)) + newVal)); } } }
public void accumulate(final long memoryAddr, final int count) { final long maxAddr = memoryAddr + count * WIDTH_ORDINAL; FieldVector inputVector = getInput(); final long incomingBit = inputVector.getValidityBufferAddress(); final long incomingValue = inputVector.getDataBufferAddress(); final long[] valueAddresses = this.valueAddresses; final int scale = ((DecimalVector)inputVector).getScale(); int incomingIndex = 0; for(long ordinalAddr = memoryAddr; ordinalAddr < maxAddr; ordinalAddr += WIDTH_ORDINAL, incomingIndex++) { final int bitVal = (PlatformDependent.getByte(incomingBit + ((incomingIndex >>> 3))) >>> (incomingIndex & 7)) & 1; java.math.BigDecimal newVal = DecimalAccumulatorUtilsNoSpill.getBigDecimal(incomingValue + (incomingIndex * WIDTH_INPUT), valBuf, scale); final int tableIndex = PlatformDependent.getInt(ordinalAddr); final long sumAddr = valueAddresses[tableIndex >>> LBlockHashTableNoSpill.BITS_IN_CHUNK] + (tableIndex & LBlockHashTableNoSpill.CHUNK_OFFSET_MASK) * WIDTH_ACCUMULATOR; PlatformDependent.putLong(sumAddr, Double.doubleToLongBits(Double.longBitsToDouble(PlatformDependent.getLong(sumAddr)) + newVal.doubleValue() * bitVal)); } } }
@Override public void copy(long offsetAddr, int count) { targetAlt.allocateNew(count); final long max = offsetAddr + count * STEP_SIZE; final long[] srcAddrs = this.srcAddrs; long dstAddr = target.getDataBufferAddress(); for(long addr = offsetAddr; addr < max; addr += STEP_SIZE, dstAddr += SIZE){ final int sv4 = PlatformDependent.getInt(addr); final long src = srcAddrs[sv4 >>> BATCH_BITS] + (sv4 & MAX_BATCH) * SIZE; PlatformDependent.putLong(dstAddr, PlatformDependent.getLong(src)); PlatformDependent.putLong(dstAddr+8, PlatformDependent.getLong(src + 8)); } }
@Override public void copy(long offsetAddr, int count) { targetAlt.allocateNew(count); final long max = offsetAddr + count * BUILD_RECORD_LINK_SIZE; final long[] srcAddrs = this.srcAddrs; long dstAddr = target.getDataBufferAddress(); for(long addr = offsetAddr; addr < max; addr += BUILD_RECORD_LINK_SIZE, dstAddr += SIZE){ final int batchIndex = PlatformDependent.getInt(addr); final int batchOffset = Short.toUnsignedInt(PlatformDependent.getShort(addr + 4)); final long src = srcAddrs[batchIndex] + batchOffset * SIZE; PlatformDependent.putInt(dstAddr, PlatformDependent.getInt(src)); } }
@Override public void copy(long offsetAddr, int count) { targetAlt.allocateNew(count); final long max = offsetAddr + count * BUILD_RECORD_LINK_SIZE; final long[] srcAddrs = this.srcAddrs; long dstAddr = target.getDataBufferAddress(); for(long addr = offsetAddr; addr < max; addr += BUILD_RECORD_LINK_SIZE, dstAddr += SIZE){ final int batchIndex = PlatformDependent.getInt(addr); final int batchOffset = Short.toUnsignedInt(PlatformDependent.getShort(addr + 4)); final long src = srcAddrs[batchIndex] + batchOffset * SIZE; PlatformDependent.putLong(dstAddr, PlatformDependent.getLong(src)); } }
@Override public void copy(long offsetAddr, int count) { targetAlt.allocateNew(count); final long max = offsetAddr + count * BUILD_RECORD_LINK_SIZE; final long[] srcAddrs = this.srcAddrs; long dstAddr = target.getDataBufferAddress(); for(long addr = offsetAddr; addr < max; addr += BUILD_RECORD_LINK_SIZE, dstAddr += SIZE){ final int batchIndex = PlatformDependent.getInt(addr); if(batchIndex != SKIP){ final int batchOffset = Short.toUnsignedInt(PlatformDependent.getShort(addr + 4)); final long srcAddr = srcAddrs[batchIndex] + batchOffset * SIZE; PlatformDependent.putLong(dstAddr, PlatformDependent.getLong(srcAddr)); } } }
@Override public void copy(long offsetAddr, int count) { targetAlt.allocateNew(count); final long max = offsetAddr + count * BUILD_RECORD_LINK_SIZE; final long[] srcAddrs = this.srcAddrs; long dstAddr = target.getDataBufferAddress(); for(long addr = offsetAddr; addr < max; addr += BUILD_RECORD_LINK_SIZE, dstAddr += SIZE){ final int batchIndex = PlatformDependent.getInt(addr); if(batchIndex != SKIP){ final int batchOffset = Short.toUnsignedInt(PlatformDependent.getShort(addr + 4)); final long srcAddr = srcAddrs[batchIndex] + batchOffset * SIZE; PlatformDependent.putInt(dstAddr, PlatformDependent.getInt(srcAddr)); } } }
@Override public void copy(long offsetAddr, int count) { targetAlt.allocateNew(count); final long max = offsetAddr + count * BUILD_RECORD_LINK_SIZE; final long[] srcAddrs = this.srcAddrs; long dstAddr = target.getDataBufferAddress(); for(long addr = offsetAddr; addr < max; addr += BUILD_RECORD_LINK_SIZE, dstAddr += SIZE){ final int batchIndex = PlatformDependent.getInt(addr); final int batchOffset = Short.toUnsignedInt(PlatformDependent.getShort(addr + 4)); final long src = srcAddrs[batchIndex] + batchOffset * SIZE; PlatformDependent.putLong(dstAddr, PlatformDependent.getLong(src)); PlatformDependent.putLong(dstAddr+8, PlatformDependent.getLong(src + 8)); } }
public void accumulate(final long memoryAddr, final int count) { final long maxAddr = memoryAddr + count * 4; final long incomingBit = getInput().getValidityBufferAddress(); final long incomingValue = getInput().getDataBufferAddress(); final long[] valueAddresses = this.valueAddresses; int incomingIndex = 0; for(long ordinalAddr = memoryAddr; ordinalAddr < maxAddr; ordinalAddr += 4, incomingIndex++){ final int bitVal = (PlatformDependent.getByte(incomingBit + ((incomingIndex >>> 3))) >>> (incomingIndex & 7)) & 1; final int newVal = PlatformDependent.getInt(incomingValue + (incomingIndex * WIDTH)) * bitVal; final int tableIndex = PlatformDependent.getInt(ordinalAddr); final long sumAddr = valueAddresses[tableIndex >>> LBlockHashTableNoSpill.BITS_IN_CHUNK] + (tableIndex & LBlockHashTableNoSpill.CHUNK_OFFSET_MASK) * 8; PlatformDependent.putLong(sumAddr, PlatformDependent.getLong(sumAddr) + newVal); } } }
public void accumulate(final long memoryAddr, final int count) { final long maxAddr = memoryAddr + count * 4; final long incomingBit = getInput().getValidityBufferAddress(); final long incomingValue = getInput().getDataBufferAddress(); final long[] valueAddresses = this.valueAddresses; int incomingIndex = 0; for(long ordinalAddr = memoryAddr; ordinalAddr < maxAddr; ordinalAddr += 4, incomingIndex++){ final int bitVal = (PlatformDependent.getByte(incomingBit + ((incomingIndex >>> 3))) >>> (incomingIndex & 7)) & 1; final long newVal = PlatformDependent.getLong(incomingValue + (incomingIndex * WIDTH)) * bitVal; final int tableIndex = PlatformDependent.getInt(ordinalAddr); final long sumAddr = valueAddresses[tableIndex >>> LBlockHashTableNoSpill.BITS_IN_CHUNK] + (tableIndex & LBlockHashTableNoSpill.CHUNK_OFFSET_MASK) * 8; PlatformDependent.putLong(sumAddr, PlatformDependent.getLong(sumAddr) + newVal); } } }
@Override public void copy(long offsetAddr, int count) { targetAlt.allocateNew(count); final long max = offsetAddr + count * BUILD_RECORD_LINK_SIZE; final long[] srcAddrs = this.srcAddrs; long dstAddr = target.getDataBufferAddress(); for(long addr = offsetAddr; addr < max; addr += BUILD_RECORD_LINK_SIZE, dstAddr += SIZE){ final int batchIndex = PlatformDependent.getInt(addr); if(batchIndex != SKIP){ final int batchOffset = Short.toUnsignedInt(PlatformDependent.getShort(addr + 4)); final long srcAddr = srcAddrs[batchIndex] + batchOffset * SIZE; PlatformDependent.putLong(dstAddr, PlatformDependent.getLong(srcAddr)); PlatformDependent.putLong(dstAddr+8, PlatformDependent.getLong(srcAddr + 8)); } } }