MCPcopy Create free account
hub / github.com/apache/arrow / MatchesInputs

Method MatchesInputs

cpp/src/arrow/compute/kernel.cc:558–579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556}
557
558bool KernelSignature::MatchesInputs(const std::vector<TypeHolder>& types) const {
559 if (is_varargs_) {
560 for (size_t i = 0; i < types.size(); ++i) {
561 if (!in_types_[std::min(i, in_types_.size() - 1)].Matches(*types[i])) {
562 return false;
563 }
564 }
565 } else {
566 if (types.size() != in_types_.size()) {
567 return false;
568 }
569 for (size_t i = 0; i < in_types_.size(); ++i) {
570 if (!in_types_[i].Matches(*types[i])) {
571 return false;
572 }
573 }
574 }
575 if (constraint_ && !constraint_->Matches(types)) {
576 return false;
577 }
578 return true;
579}
580
581size_t KernelSignature::Hash() const {
582 if (hash_code_ != 0) {

Callers 5

HandleInconsistentTypesFunction · 0.80
TESTFunction · 0.80
TESTFunction · 0.80
DispatchExactMethod · 0.80
DispatchExactImplFunction · 0.80

Calls 2

sizeMethod · 0.45
MatchesMethod · 0.45

Tested by 2

TESTFunction · 0.64
TESTFunction · 0.64