aimstil  5.0.5
point_operators.h File Reference

Go to the source code of this file.

Classes

struct  til::functor::CastTo< Point< T, D, TStorage >, X >
 By default, bounce any cast to the underlying container. More...
 

Namespaces

 til
 Belongs to package Box Do not include directly, include til/Box.h instead.
 
 til::functor
 

Macros

#define TIL_BOUNCE_BOOL_OP_TO_DATA(op)
 
#define TIL_BOUNCE_VEC_OP_TO_DATA(op, arg1, arg2, res, functor)
 
#define TIL_BOUNCE_SCALAR_OP_TO_DATA(op, functor)
 

Functions

 til::TIL_BOUNCE_VEC_OP_TO_DATA (+, Point, Vector, Point, functor::Add)
 
 til::TIL_BOUNCE_VEC_OP_TO_DATA (+, Vector, Point, Point, functor::Add)
 
 til::TIL_BOUNCE_VEC_OP_TO_DATA (-, Point, Vector, Point, functor::Sub)
 
 til::TIL_BOUNCE_VEC_OP_TO_DATA (-, Point, Point, Vector, functor::Sub)
 
template<typename T , std::size_t D, typename TStorage >
std::ostream & til::operator<< (std::ostream &os, const Point< T, D, TStorage > &p)
 

Macro Definition Documentation

◆ TIL_BOUNCE_BOOL_OP_TO_DATA

#define TIL_BOUNCE_BOOL_OP_TO_DATA (   op)
Value:
template < typename T1, typename T2, std::size_t D, typename TStorage1, typename TStorage2 > \
inline bool operator op (const Point<T1,D,TStorage1> & x, const Point<T2,D,TStorage2> & y) \
{ return x.data() op y.data(); } \

Definition at line 23 of file point_operators.h.

◆ TIL_BOUNCE_SCALAR_OP_TO_DATA

#define TIL_BOUNCE_SCALAR_OP_TO_DATA (   op,
  functor 
)
Value:
template < typename T, std::size_t D, typename TStorage > \
inline Point<T,D,TStorage> operator op (const Point<T,D,TStorage> & x, T y) \
{ return functor <TStorage,T,Point<T,D,TStorage> >()(x.data(), y); } \
template < typename T, std::size_t D, typename TStorage > \
inline Point<T,D,TStorage> operator op (T y, const Point<T,D,TStorage> & x) \
{ return functor <T,TStorage,Point<T,D,TStorage> >()(y, x.data()); } \

Definition at line 46 of file point_operators.h.

◆ TIL_BOUNCE_VEC_OP_TO_DATA

#define TIL_BOUNCE_VEC_OP_TO_DATA (   op,
  arg1,
  arg2,
  res,
  functor 
)
Value:
template < typename T, std::size_t D, typename TStorage > \
inline res <T,D,TStorage> operator op (const arg1 <T,D,TStorage> & x, const arg2 <T,D,TStorage> & y) \
{ return functor<TStorage,TStorage,res <T,D,TStorage> >()(x.data(), y.data()); }

Definition at line 33 of file point_operators.h.