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

Function ExtInsMatch

source/opt/composite.cpp:28–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26namespace opt {
27
28bool ExtInsMatch(const std::vector<uint32_t>& extIndices,
29 const Instruction* insInst, const uint32_t extOffset) {
30 uint32_t numIndices = static_cast<uint32_t>(extIndices.size()) - extOffset;
31 if (numIndices != insInst->NumInOperands() - 2) return false;
32 for (uint32_t i = 0; i < numIndices; ++i)
33 if (extIndices[i + extOffset] != insInst->GetSingleWordInOperand(i + 2))
34 return false;
35 return true;
36}
37
38bool ExtInsConflict(const std::vector<uint32_t>& extIndices,
39 const Instruction* insInst, const uint32_t extOffset) {

Callers 1

MarkInsertChainMethod · 0.85

Calls 3

NumInOperandsMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected