MCPcopy
hub / github.com/uber/aresdb / prepareForFiltering

Method prepareForFiltering

query/aql_processor.go:718–731  ·  view source on GitHub ↗

prepareForFiltering prepares the input and the index vectors for filtering.

(
	columns []deviceVectorPartySlice, firstColumn int, startRow int, stream unsafe.Pointer)

Source from the content-addressed store, hash-verified

716
717// prepareForFiltering prepares the input and the index vectors for filtering.
718func (bc *oopkBatchContext) prepareForFiltering(
719 columns []deviceVectorPartySlice, firstColumn int, startRow int, stream unsafe.Pointer) {
720 bc.columns = columns
721 bc.startRow = startRow
722
723 if firstColumn >= 0 {
724 bc.size = columns[firstColumn].length
725 // Allocate twice of the size to save number of allocations of temporary index vector.
726 bc.indexVectorD = deviceAllocate(bc.size*4, bc.device)
727 bc.predicateVectorD = deviceAllocate(bc.size, bc.device)
728 bc.baseCountD = columns[firstColumn].counts.offset(columns[firstColumn].countStartIndex * 4)
729 }
730 bc.stats.batchSize = bc.size
731}
732
733// prepareForDimAndMeasureEval ensures that dim/measure vectors have enough
734// capacity for bc.resultSize+bc.size.

Callers 2

processBatchMethod · 0.80

Calls 2

deviceAllocateFunction · 0.85
offsetMethod · 0.80

Tested by

no test coverage detected