MCPcopy Create free account
hub / github.com/bytedance/bolt / allInputTypesEquivalent

Function allInputTypesEquivalent

bolt/expression/ExprCompiler.cpp:116–124  ·  view source on GitHub ↗

Utility method to check eligibility for flattening.

Source from the content-addressed store, hash-verified

114
115// Utility method to check eligibility for flattening.
116bool allInputTypesEquivalent(const TypedExprPtr& expr) {
117 const auto& inputs = expr->inputs();
118 for (int i = 1; i < inputs.size(); i++) {
119 if (!inputs[0]->type()->equivalent(*inputs[i]->type())) {
120 return false;
121 }
122 }
123 return true;
124}
125
126std::optional<std::string> shouldFlatten(
127 const TypedExprPtr& expr,

Callers 2

shouldFlattenFunction · 0.85
flattenInputFunction · 0.85

Calls 3

sizeMethod · 0.45
equivalentMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected