MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / CompactIds

Function CompactIds

source/diff/diff.cpp:60–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58};
59
60void CompactIds(std::vector<uint32_t>& ids) {
61 size_t write_index = 0;
62 for (size_t i = 0; i < ids.size(); ++i) {
63 if (ids[i] != 0) {
64 ids[write_index++] = ids[i];
65 }
66 }
67 ids.resize(write_index);
68}
69
70// A mapping from ids in one module to ids in the other.
71//

Callers 1

MatchIdsMethod · 0.85

Calls 2

resizeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected