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

Function ExtInsConflict

source/opt/composite.cpp:38–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38bool ExtInsConflict(const std::vector<uint32_t>& extIndices,
39 const Instruction* insInst, const uint32_t extOffset) {
40 if (extIndices.size() - extOffset == insInst->NumInOperands() - 2)
41 return false;
42 uint32_t extNumIndices = static_cast<uint32_t>(extIndices.size()) - extOffset;
43 uint32_t insNumIndices = insInst->NumInOperands() - 2;
44 uint32_t numIndices = std::min(extNumIndices, insNumIndices);
45 for (uint32_t i = 0; i < numIndices; ++i)
46 if (extIndices[i + extOffset] != insInst->GetSingleWordInOperand(i + 2))
47 return false;
48 return true;
49}
50
51} // namespace opt
52} // namespace spvtools

Callers 1

MarkInsertChainMethod · 0.85

Calls 3

NumInOperandsMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected