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

Method MatchesInputs

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

Source from the content-addressed store, hash-verified

572}
573
574bool KernelSignature::MatchesInputs(const std::vector<TypeHolder>& types) const {
575 if (is_varargs_) {
576 for (size_t i = 0; i < types.size(); ++i) {
577 if (!in_types_[std::min(i, in_types_.size() - 1)].Matches(*types[i])) {
578 return false;
579 }
580 }
581 } else {
582 if (types.size() != in_types_.size()) {
583 return false;
584 }
585 for (size_t i = 0; i < in_types_.size(); ++i) {
586 if (!in_types_[i].Matches(*types[i])) {
587 return false;
588 }
589 }
590 }
591 if (constraint_ && !constraint_->Matches(types)) {
592 return false;
593 }
594 return true;
595}
596
597size_t KernelSignature::Hash() const {
598 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