7 #ifndef NIHU_P2X_INDEXED_HPP_INCLUDED
8 #define NIHU_P2X_INDEXED_HPP_INCLUDED
11 #include <type_traits>
21 template <
class Operator,
class It>
23 :
public fmm_operator<typename std::decay<Operator>::type::fmm_tag>
27 typedef typename std::decay<Operator>::type operator_t;
28 typedef It iterator_t;
30 typedef typename operator_t::test_input_t test_input_t;
31 typedef size_t trial_input_t;
32 typedef typename operator_t::result_t result_t;
35 : m_op(std::forward<Operator>(op))
41 result_t operator()(test_input_t
const &ti,
size_t idx)
const
43 return m_op(ti, m_begin[idx]);
46 size_t num_src()
const
48 return m_end - m_begin;
57 template <
class Operator,
class It>
58 auto create_p2x_indexed(Operator &&op, It begin, It end)