prepareForFiltering prepares the input and the index vectors for filtering.
( columns []deviceVectorPartySlice, firstColumn int, startRow int, stream unsafe.Pointer)
| 716 | |
| 717 | // prepareForFiltering prepares the input and the index vectors for filtering. |
| 718 | func (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. |
no test coverage detected