| 174 | } |
| 175 | |
| 176 | void SwissTable::init_slot_ids(const int num_keys, const uint16_t* selection, |
| 177 | const uint32_t* hashes, const uint8_t* local_slots, |
| 178 | const uint8_t* match_bitvector, |
| 179 | uint32_t* out_slot_ids) const { |
| 180 | ARROW_DCHECK(selection); |
| 181 | if (log_blocks_ == 0) { |
| 182 | for (int i = 0; i < num_keys; ++i) { |
| 183 | uint16_t id = selection[i]; |
| 184 | uint32_t match = ::arrow::bit_util::GetBit(match_bitvector, id) ? 1 : 0; |
| 185 | uint32_t slot_id = local_slots[id] + match; |
| 186 | out_slot_ids[id] = slot_id; |
| 187 | } |
| 188 | } else { |
| 189 | for (int i = 0; i < num_keys; ++i) { |
| 190 | uint16_t id = selection[i]; |
| 191 | uint32_t hash = hashes[id]; |
| 192 | uint32_t iblock = block_id_from_hash(hash, log_blocks_); |
| 193 | uint32_t match = ::arrow::bit_util::GetBit(match_bitvector, id) ? 1 : 0; |
| 194 | uint32_t slot_id = global_slot_id(iblock, local_slots[id] + match); |
| 195 | out_slot_ids[id] = slot_id; |
| 196 | } |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | void SwissTable::init_slot_ids_for_new_keys(uint32_t num_ids, const uint16_t* ids, |
| 201 | const uint32_t* hashes, |
nothing calls this directly
no test coverage detected