| 646 | */ |
| 647 | template <typename Key> |
| 648 | void optimizeMappings(const Allocator &allocator, const size_t MAPPING_SIZE, |
| 649 | size_t granularity, MappingSet &mappings) |
| 650 | { |
| 651 | Radix::Node<Key> *tree = nullptr; |
| 652 | for (auto mapping: mappings) |
| 653 | { |
| 654 | Key key = calculateKey<Key>(allocator, MAPPING_SIZE, mapping); |
| 655 | tree = merge(tree, key, mapping); |
| 656 | } |
| 657 | log(COLOR_NONE, '\n'); |
| 658 | |
| 659 | mappings.clear(); |
| 660 | collectMappings(tree, mappings); |
| 661 | log(COLOR_NONE, '\n'); |
| 662 | |
| 663 | for (auto mapping: mappings) |
| 664 | shrinkMapping(mapping, granularity); |
| 665 | } |
| 666 | template |
| 667 | void optimizeMappings<Key128>(const Allocator &allocator, |
| 668 | const size_t MAPPING_SIZE, size_t granularity, MappingSet &mappings); |
nothing calls this directly
no test coverage detected