]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common/include: Add map type election and fmt::format to interval_map 62200/head
authorAlex Ainscow <aainscow@uk.ibm.com>
Mon, 10 Mar 2025 11:31:45 +0000 (11:31 +0000)
committerAlex Ainscow <aainscow@uk.ibm.com>
Wed, 12 Mar 2025 00:10:24 +0000 (00:10 +0000)
commit96be3f122c3bb617aa2adfdb7f1f6d971d077376
treec960791bb8e02a1487792a24f00ded133aa695e8
parent9ef9c124511eeafb09eb4cbdfea083dc00cae106
common/include: Add map type election and fmt::format to interval_map

Add capability to choose the type of map used in interval_map.

The default will be std::map and so should not change any existing
implementation.

This behaviour is already available in interval_set. The intention
is to enable a more efficient map library which suits a particular
application.

The optimized EC code, which is coming soon, will use a boost::flat_map
here since it deals with large numbers of very small (usually single-entry)
interval_maps.

Also adds fmt::format support and refactors print functions in both
set and map.

Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
src/common/interval_map.h
src/include/interval_set.h
src/test/common/test_interval_map.cc
src/test/common/test_interval_set.cc