MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / setCostTable

Method setCostTable

include/common/statistics.h:59–64  ·  view source on GitHub ↗

Setter and getter for the cost table.

Source from the content-addressed store, hash-verified

57
58 /// Setter and getter for the cost table.
59 void setCostTable(Span<const uint64_t> NewTable) {
60 CostTab.assign(NewTable.begin(), NewTable.end());
61 if (unlikely(CostTab.size() < UINT16_MAX + 1)) {
62 CostTab.resize(UINT16_MAX + 1, 0ULL);
63 }
64 }
65 Span<const uint64_t> getCostTable() const noexcept { return CostTab; }
66 Span<uint64_t> getCostTable() noexcept { return CostTab; }
67

Callers 1

Calls 6

unlikelyFunction · 0.85
assignMethod · 0.80
resizeMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected