summaryrefslogtreecommitdiff
path: root/payload_generator/graph_utils.h
diff options
context:
space:
mode:
authorAlex Deymo <deymo@chromium.org>2015-06-03 19:06:50 +0200
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-06-04 10:43:16 +0000
commit5c6c65570013bbdbd67f9bf6391dd295ef5b5ee6 (patch)
treec2655ce831e0428ff87d3c065a9702b9b3564b82 /payload_generator/graph_utils.h
parentcef5cd6acf26b518523511f6d633a730baef4d7e (diff)
update_engine: Split Extent utils from graph_utils.
"Graph" related utils should only concern parts of the code using the inplace generator, since other generators don't use a dependency graph. This patch splits the Extent related utils from the graph related ones creating a new extent_utils.h file. BUG=None TEST=unittest still pass. Change-Id: I0941698b0a47a6cc222e8dc062fc54eb3cdf4de2 Reviewed-on: https://chromium-review.googlesource.com/274899 Reviewed-by: Gilad Arnold <garnold@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org> Tested-by: Alex Deymo <deymo@chromium.org>
Diffstat (limited to 'payload_generator/graph_utils.h')
-rw-r--r--payload_generator/graph_utils.h21
1 files changed, 0 insertions, 21 deletions
diff --git a/payload_generator/graph_utils.h b/payload_generator/graph_utils.h
index e4692e05..6595e57f 100644
--- a/payload_generator/graph_utils.h
+++ b/payload_generator/graph_utils.h
@@ -35,27 +35,6 @@ void DropWriteBeforeDeps(Vertex::EdgeMap* edge_map);
// For each node N in graph, drop all edges N->|index|.
void DropIncomingEdgesTo(Graph* graph, Vertex::Index index);
-// block must either be the next block in the last extent or a block
-// in the next extent. This function will not handle inserting block
-// into an arbitrary place in the extents.
-void AppendBlockToExtents(std::vector<Extent>* extents, uint64_t block);
-
-// Get/SetElement are intentionally overloaded so that templated functions
-// can accept either type of collection of Extents.
-Extent GetElement(const std::vector<Extent>& collection, size_t index);
-Extent GetElement(
- const google::protobuf::RepeatedPtrField<Extent>& collection,
- size_t index);
-
-template<typename T>
-uint64_t BlocksInExtents(const T& collection) {
- uint64_t ret = 0;
- for (size_t i = 0; i < static_cast<size_t>(collection.size()); ++i) {
- ret += GetElement(collection, i).num_blocks();
- }
- return ret;
-}
-
void DumpGraph(const Graph& graph);
} // namespace graph_utils