Commit f26418c0 authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

mln/transform/internal/distance_functor.hh: Split declaration and implementation.

git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@4240 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent f9c2e3a9
2009-07-06 Guillaume Lazzara <guillaume.lazzara@lrde.epita.fr>
* mln/transform/internal/distance_functor.hh: Split declaration and
implementation.
2009-07-06 Guillaume Lazzara <guillaume.lazzara@lrde.epita.fr> 2009-07-06 Guillaume Lazzara <guillaume.lazzara@lrde.epita.fr>
   
Fix few tests. Fix few tests.
...@@ -58,16 +58,19 @@ namespace mln ...@@ -58,16 +58,19 @@ namespace mln
void process(const P&, const P&); void process(const P&, const P&);
void init_(const I&) {} void init_(const I&);
bool inqueue_p_wrt_input_p_(const V& input_p) { return input_p == true; } bool inqueue_p_wrt_input_p_(const V& input_p);
void init_p_(unsigned) {} void init_p_(unsigned);
bool inqueue_p_wrt_input_n_(const V& input_n) { return input_n == false; } bool inqueue_p_wrt_input_n_(const V& input_n);
void process_(unsigned, unsigned) {} void process_(unsigned, unsigned);
}; };
# ifndef MLN_INCLUDE_ONLY # ifndef MLN_INCLUDE_ONLY
// Generic implementation.
template <typename I> template <typename I>
inline inline
void void
...@@ -86,7 +89,7 @@ namespace mln ...@@ -86,7 +89,7 @@ namespace mln
template <typename I> template <typename I>
inline inline
void void
distance_functor<I>::init_p(const P&) distance_functor<I>::init_p(const mln_site(I)&)
{ {
} }
...@@ -104,6 +107,46 @@ namespace mln ...@@ -104,6 +107,46 @@ namespace mln
{ {
} }
// Fastest implementation.
template <typename I>
inline
void
distance_functor<I>::init_(const I&)
{
}
template <typename I>
inline
bool
distance_functor<I>::inqueue_p_wrt_input_p_(const V& input_p)
{
return input_p == true;
}
template <typename I>
inline
void
distance_functor<I>::init_p_(unsigned)
{
}
template <typename I>
inline
bool
distance_functor<I>::inqueue_p_wrt_input_n_(const V& input_n)
{
return input_n == false;
}
template <typename I>
inline
void distance_functor<I>::process_(unsigned, unsigned)
{
}
# endif // ! MLN_INCLUDE_ONLY # endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::transform::internal } // end of namespace mln::transform::internal
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment