// // Copyright (C) 2011-15 DyND Developers // BSD 2-Clause License, see LICENSE.txt // #pragma once #include #include #include #include #include #include #include #include #include #include namespace dynd { namespace nd { namespace detail { /** * Presently, there are some specially treated keyword arguments in * arrfuncs. The "dst_tp" keyword argument always tells the desired * output type, and the "dst" keyword argument always provides an * output array. */ inline bool is_special_kwd(const ndt::callable_type *DYND_UNUSED(self_tp), array &dst, const std::string &name, const nd::array &value) { if (name == "dst_tp") { dst = nd::empty(value.as()); return true; } else if (name == "dst") { dst = value; return true; } return false; } DYND_API void check_narg(const ndt::callable_type *af_tp, intptr_t narg); DYND_API void check_arg(const ndt::callable_type *af_tp, intptr_t i, const ndt::type &actual_tp, const char *actual_arrmeta, std::map &tp_vars); template kernel_targets_t get_targets() { return kernel_targets_t{reinterpret_cast(KernelType::single_wrapper), NULL, reinterpret_cast(NULL)}; } template const volatile char *get_ir() { return KernelType::ir; } template