Esempio n. 1
0
      std::size_t
      multidispatch_match(const ndt::type &self_tp, T &&children,
                          const callable &DYND_UNUSED(default_child))
      {
        size_t data_size_max = 0;
        for (auto it = dynd::begin<K>(children), end = dynd::end<K>(children);
             it != end; ++it) {
          const callable &child = get_second_if_pair(*it);
          if (!child.is_null()) {
            std::map<string, ndt::type> tp_vars;
            if (!self_tp.match(child.get_array_type(), tp_vars)) {
              //            This needs to be reenabled, but it needs to
              //            appended keywords properly
              //            throw std::invalid_argument("could not match
              //            callables");
            }

            size_t data_size = child.get()->data_size;
            if (data_size > data_size_max) {
              data_size_max = data_size;
            }
          }
        }

        return data_size_max;
      }