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

Method IsCompatibleWithExecutionModel

source/val/function.cpp:387–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385}
386
387bool Function::IsCompatibleWithExecutionModel(spv::ExecutionModel model,
388 std::string* reason) const {
389 bool return_value = true;
390 std::stringstream ss_reason;
391
392 for (const auto& is_compatible : execution_model_limitations_) {
393 std::string message;
394 if (!is_compatible(model, &message)) {
395 if (!reason) return false;
396 return_value = false;
397 if (!message.empty()) {
398 ss_reason << message << "\n";
399 }
400 }
401 }
402
403 if (!return_value && reason) {
404 *reason = ss_reason.str();
405 }
406
407 return return_value;
408}
409
410bool Function::CheckLimitations(const ValidationState_t& _,
411 const Function* entry_point,

Callers 1

Calls 2

emptyMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected