include/basix/wrap.hpp File Reference

Go to the source code of this file.

Namespaces

Defines


Detailed Description

Definition in file wrap.hpp.


Define Documentation

#define WRAP_BINARY_IMPL ( TMPL,
C,
R,
Name,
Full   ) 
Value:
TMPL struct binary_helper<C >: public void_binary_helper<C > {  \
  static inline string short_type_name () { return Name; }      \
  static inline generic full_type_name () { return Full; }      \
  static inline generic disassemble (const C& x) {              \
    return as<generic> (*x); }                                  \
  static inline C assemble (const generic& x) {                 \
    return C (as<R > (x)); }                                    \
  static inline void write (const port& out, const C& c) {      \
    binary_write<R > (out, *c); }                               \
  static inline C read (const port& in) {                       \
    return C (binary_read<R > (in)); }                          \
};

Definition at line 50 of file wrap.hpp.

#define WRAP_BINARY_IMPL_1 ( TMPL,
C,
R,
Name,
Full,
 ) 
Value:
TMPL struct binary_helper<C >: public void_binary_helper<C > {  \
  static inline string short_type_name () {                     \
    return Name * Short_type_name (A); }                        \
  static inline generic full_type_name () {                     \
    return gen (Full, Full_type_name (A)); }                    \
  static inline generic disassemble (const C& x) {              \
    return as<generic> (*x); }                                  \
  static inline C assemble (const generic& x) {                 \
    return C (as<R > (x)); }                                    \
  static inline void write (const port& out, const C& c) {      \
    binary_write<R > (out, *c); }                               \
  static inline C read (const port& in) {                       \
    return C (binary_read<R > (in)); }                          \
};

Definition at line 64 of file wrap.hpp.

#define WRAP_COMPARE_IMPL ( TMPL,
 ) 
Value:
TMPL bool operator <= (const C& c1, const C& c2) { return (*c1) <= (*c2); } \
TMPL bool operator <  (const C& c1, const C& c2) { return (*c1) <  (*c2); } \
TMPL bool operator >= (const C& c1, const C& c2) { return (*c1) >= (*c2); } \
TMPL bool operator >  (const C& c1, const C& c2) { return (*c1) >  (*c2); }

Definition at line 105 of file wrap.hpp.

#define WRAP_COMPLEX_IMPL ( TMPL,
C,
 ) 
Value:
TMPL C gaussian (const R& c1, const R& c2) {            \
  return C (gaussian (*c1, *c2)); }                     \
TMPL C polar (const R& c1, const R& c2) {               \
  return C (polar (*c1, *c2)); }                        \
TMPL R Re (const C& c) { return R (Re (*c)); }          \
TMPL R Im (const C& c) { return R (Im (*c)); }          \
TMPL R abs (const C& c) { return R (abs (*c)); }        \
TMPL R arg (const C& c) { return R (arg (*c)); }        \
TMPL C conj (const C& c) { return C (conj (*c)); }

Definition at line 164 of file wrap.hpp.

#define WRAP_ELEMENTARY_IMPL ( TMPL,
 ) 
Value:
TMPL C sqrt (const C& c) { return C (sqrt (*c)); }                      \
TMPL C exp (const C& c) { return C (exp (*c)); }                        \
TMPL C log (const C& c) { return C (log (*c)); }                        \
TMPL C pow (const C& c1, const C& c2) { return C (pow (*c1, *c2)); }    \
TMPL C cos (const C& c) { return C (cos (*c)); }                        \
TMPL C sin (const C& c) { return C (sin (*c)); }                        \
TMPL C tan (const C& c) { return C (tan (*c)); }                        \
TMPL C acos (const C& c) { return C (acos (*c)); }                      \
TMPL C asin (const C& c) { return C (asin (*c)); }                      \
TMPL C atan (const C& c) { return C (atan (*c)); }                      \
TMPL C cosh (const C& c) { return C (cosh (*c)); }                      \
TMPL C sinh (const C& c) { return C (sinh (*c)); }                      \
TMPL C tanh (const C& c) { return C (tanh (*c)); }                      \
TMPL C acosh (const C& c) { return C (acosh (*c)); }                    \
TMPL C asinh (const C& c) { return C (asinh (*c)); }                    \
TMPL C atanh (const C& c) { return C (atanh (*c)); }

Definition at line 138 of file wrap.hpp.

#define WRAP_FIELD_IMPL ( TMPL,
 ) 
Value:
TMPL C operator - (const C& c) { return C(-*c); }                          \
TMPL C operator + (const C& c1, const C& c2) { return C ((*c1) + (*c2)); } \
TMPL C operator - (const C& c1, const C& c2) { return C ((*c1) - (*c2)); } \
TMPL C operator * (const C& c1, const C& c2) { return C ((*c1) * (*c2)); } \
TMPL C operator / (const C& c1, const C& c2) { return C ((*c1) / (*c2)); } \
TMPL C& operator += (C& c1, const C& c2) { (*c1) += (*c2); return c1; }    \
TMPL C& operator -= (C& c1, const C& c2) { (*c1) -= (*c2); return c1; }    \
TMPL C& operator *= (C& c1, const C& c2) { (*c1) *= (*c2); return c1; }    \
TMPL C& operator /= (C& c1, const C& c2) { (*c1) /= (*c2); return c1; }

Definition at line 84 of file wrap.hpp.

#define WRAP_INDIRECT_IMPL ( TMPL,
 ) 
Value:
TMPL nat hash (const C& c) { return hash (*c); }                              \
TMPL nat exact_hash (const C& c) { return exact_hash (*c); }                  \
TMPL bool operator == (const C& c1, const C& c2) { return (*c1) == (*c2); }   \
TMPL bool operator != (const C& c1, const C& c2) { return (*c1) != (*c2); }   \
TMPL bool exact_eq (const C& c1, const C& c2) { return exact_eq (*c1, *c2); } \
TMPL bool exact_neq (const C& c1, const C& c2) { return exact_neq (*c1, *c2); }

Definition at line 24 of file wrap.hpp.

#define WRAP_NUMBER_CHECK_IMPL ( TMPL,
 ) 
Value:
TMPL bool is_finite (const C& c) { return is_finite (*c); }     \
TMPL bool is_infinite (const C& c) { return is_infinite (*c); } \
TMPL bool is_fuzz (const C& c) { return is_nan (*c); }          \
TMPL bool is_nan (const C& c) { return is_nan (*c); }           \
TMPL bool is_reliable (const C& c) { return is_reliable (*c); }

Definition at line 127 of file wrap.hpp.

#define WRAP_PRINT_IMPL ( TMPL,
 )     TMPL syntactic flatten (const C& c) { return flatten (*c); }

Definition at line 47 of file wrap.hpp.

#define WRAP_REAL_IMPL ( TMPL,
 ) 
Value:
TMPL C hypot (const C& c1, const C& c2) { return C (hypot (*c1, *c2)); } \
TMPL C atan2 (const C& c1, const C& c2) { return C (atan2 (*c1, *c2)); }

Definition at line 160 of file wrap.hpp.

#define WRAP_RING_COMPARE_IMPL ( TMPL,
 ) 
Value:
TMPL bool is_zero (const C& c) { return is_zero (*c); }                 \
TMPL bool is_non_zero (const C& c) { return is_non_zero (*c); }         \
TMPL int  sign (const C& c) { return sign (*c); }                       \
TMPL C abs (const C& c) { return C (abs (*c)); }                        \
TMPL C min (const C& c1, const C& c2) { return C (min (*c1, *c2)); }    \
TMPL C max (const C& c1, const C& c2) { return C (max (*c1, *c2)); }

Definition at line 115 of file wrap.hpp.

#define WRAP_RING_EQUAL_IMPL ( TMPL,
 ) 
Value:
TMPL bool is_zero (const C& c) { return is_zero (*c); }         \
TMPL bool is_non_zero (const C& c) { return is_non_zero (*c); }

Definition at line 111 of file wrap.hpp.

#define WRAP_SHIFT_IMPL ( TMPL,
 ) 
Value:
TMPL C operator << (const C& c, const xint& sh) { return C (*c << sh); } \
TMPL C operator >> (const C& c, const xint& sh) { return C (*c >> sh); } \
TMPL C& operator <<= (C& c, const xint& sh) { *c << sh; return c; }      \
TMPL C& operator >>= (C& c, const xint& sh) { *c >> sh; return c; }

Definition at line 95 of file wrap.hpp.

#define WRAP_WRAPPED_IMPL ( TMPL,
 ) 
Value:
TMPL nat hash (const C& c) { return hash (*c); }                              \
TMPL nat exact_hash (const C& c) { return exact_hash (*c); }                  \
TMPL nat hard_hash (const C& c) { return hard_hash (*c); }                    \
TMPL bool operator == (const C& c1, const C& c2) { return (*c1) == (*c2); }   \
TMPL bool operator != (const C& c1, const C& c2) { return (*c1) != (*c2); }   \
TMPL bool exact_eq (const C& c1, const C& c2) { return exact_eq (*c1, *c2); } \
TMPL bool exact_neq (const C& c1, const C& c2) { return exact_neq(*c1,*c2); } \
TMPL bool hard_eq (const C& c1, const C& c2) { return hard_eq (*c1, *c2); }   \
TMPL bool hard_neq (const C& c1, const C& c2) { return hard_neq (*c1, *c2); }

Definition at line 32 of file wrap.hpp.


Generated on 6 Dec 2012 for basix by  doxygen 1.6.1