basix_doc 0.1
/Users/mourrain/Devel/mmx/basix/include/basix/basix.hpp File Reference
#include <basix/fast_new.hpp>
#include <cmath>

Go to the source code of this file.

Classes

Namespaces

Defines

Enumerations

Functions

Variables


Detailed Description

Definition in file basix.hpp.


Define Documentation

#define DEC_COUNT (   x)    { if (0==--((x)->ref_count)) delete (x); }

Definition at line 147 of file basix.hpp.

#define DEFINE_VARIANT (   L,
 
)
Value:
struct L: public R {}; \
template<typename FF, typename MM> \
struct implementation<FF,MM,L >: \
  public implementation<FF,MM,R > {};

Definition at line 383 of file basix.hpp.

#define DEFINE_VARIANT_1 (   XX,
  X,
  L,
 
)
Value:
template<XX> struct L: public R {}; \
template<typename FF, typename MM, XX> \
struct implementation<FF,MM,L<X> >: \
  public implementation<FF,MM,R > {};

Definition at line 389 of file basix.hpp.

#define INC_COUNT (   x)    { (x)->ref_count++; }

Definition at line 146 of file basix.hpp.

#define INDIRECT_IMPL (   T,
 
)
Value:
inline T::T (R* rep2): rep(rep2) {}                                     \
  inline T::T (const R* rep2, bool with_inc):                           \
    rep((R*) (void*) rep2) { (void) with_inc; INC_COUNT (rep); }        \
  inline T::T (const T& x): rep(x.rep) { INC_COUNT (rep); }             \
  inline T::~T () { DEC_COUNT (rep); }                                  \
  inline const R* T::operator -> () const { return rep; }               \
  inline T& T::operator = (const T& x) {                                \
    INC_COUNT (x.rep); DEC_COUNT (rep);                                 \
    rep=x.rep; return *this; }                                          \
  inline void T::secure () {                                            \
    if (rep->ref_count>1) *this= copy (*this); }                        \
  inline R* inside (const T& x) {                                       \
    return const_cast<R*> (x.operator -> ()); }                         \
  STMPL inline nat hard_hash (const T& x) {                             \
    return as_hash (x.operator -> ()); }                                \
  STMPL inline bool hard_eq (const T& x, const T& y) {                  \
    return (x.operator -> ()) == (y.operator -> ()); }                  \
  STMPL inline bool hard_neq (const T& x, const T& y) {                 \
    return (x.operator -> ()) != (y.operator -> ()); }

Definition at line 168 of file basix.hpp.

#define INDIRECT_IMPL_1 (   T,
  R,
  XX,
 
)
Value:
template<XX> inline T<X >::T (R<X >* rep2): rep(rep2) {}                \
  template<XX> inline T<X >::T (const R<X >* rep2, bool with_inc):      \
    rep((R<X >*) (void*) rep2) { (void) with_inc; INC_COUNT (rep); }    \
  template<XX> inline T<X >::T (const T<X >& x): rep(x.rep) {           \
    INC_COUNT (rep); }                                                  \
  template<XX> inline T<X >::~T () { DEC_COUNT (rep); }                 \
  template<XX> inline const R<X >* T<X >::operator -> () const {        \
    return rep; }                                                       \
  template<XX> inline R<X >* T<X >::operator -> () {                    \
    return rep; }                                                       \
  template<XX> inline T<X >&                                            \
  T<X >::operator = (const T<X >& x) {                                  \
    INC_COUNT (x.rep); DEC_COUNT (rep);                                 \
    rep=x.rep; return *this; }                                          \
  template<XX> inline void T<X >::secure () {                           \
    if (rep->ref_count>1) *this= copy (*this); }                        \
  template<XX> R<X >* inside (const T<X >& x) {                         \
    return const_cast<R<X >*> (x.operator -> ()); }                     \
  template<XX> inline nat hard_hash (const T<X >& x) {                  \
    return as_hash (x.operator -> ()); }                                \
  template<XX> inline bool hard_eq (const T<X >& x, const T<X >& y) {   \
    return (x.operator -> ()) == (y.operator -> ()); }                  \
  template<XX> inline bool hard_neq (const T<X >& x, const T<X >& y) {  \
    return (x.operator -> ()) != (y.operator -> ()); }

Definition at line 210 of file basix.hpp.

#define INDIRECT_IMPL_2 (   T,
  R,
  XX,
  X,
  YY,
 
)
Value:
template<XX,YY> inline T<X,Y >::T (R<X,Y >* rep2): rep(rep2) {}       \
  template<XX,YY> inline T<X,Y >::T (const R<X,Y >* rep2, bool inc):          \
    rep((R<X,Y >*) (void*) rep2) { (void) inc; INC_COUNT (rep); }             \
  template<XX,YY> inline T<X,Y >::T (const T<X,Y >& x): rep(x.rep) {          \
    INC_COUNT (rep); }                                                        \
  template<XX,YY> inline T<X,Y >::~T () { DEC_COUNT (rep); }                  \
  template<XX,YY> inline const R<X,Y >* T<X,Y >::operator -> () const {       \
    return rep; }                                                             \
  template<XX,YY> inline T<X,Y >&                                             \
  T<X,Y >::operator = (const T<X,Y >& x) {                                    \
    INC_COUNT (x.rep); DEC_COUNT (rep);                                       \
    rep=x.rep; return *this; }                                                \
  template<XX,YY> inline void T<X,Y >::secure () {                            \
    if (rep->ref_count>1) *this= copy (*this); }                              \
  template<XX,YY> R<X,Y >* inside (const T<X,Y >& x) {                        \
    return const_cast<R<X,Y >*> (x.operator -> ()); }                         \
  template<XX,YY> inline nat hard_hash (const T<X,Y >& x) {                   \
    return as_hash (x.operator -> ()); }                                      \
  template<XX,YY> inline bool hard_eq (const T<X,Y >& x, const T<X,Y >& y) {  \
    return (x.operator -> ()) == (y.operator -> ()); }                        \
  template<XX,YY> inline bool hard_neq (const T<X,Y >& x, const T<X,Y >& y) { \
    return (x.operator -> ()) != (y.operator -> ()); }

Definition at line 262 of file basix.hpp.

#define INDIRECT_IMPL_3 (   T,
  R,
  XX,
  X,
  YY,
  Y,
  ZZ,
 
)
Value:
template<XX,YY,ZZ> inline T<X,Y,Z >::T (R<X,Y,Z >* rep2):               \
    rep(rep2) {}                                                        \
  template<XX,YY,ZZ> inline                                             \
  T<X,Y,Z >::T (const R<X,Y,Z >* rep2, bool inc):                       \
    rep((R<X,Y,Z >*) (void*) rep2) { (void) inc; INC_COUNT (rep); }     \
  template<XX,YY,ZZ> inline T<X,Y,Z >::T (const T<X,Y,Z >& x):          \
    rep(x.rep) { INC_COUNT (rep); }                                     \
  template<XX,YY,ZZ> inline T<X,Y,Z >::~T () { DEC_COUNT (rep); }       \
  template<XX,YY,ZZ> inline const R<X,Y,Z >*                            \
  T<X,Y,Z >::operator -> () const {                                     \
    return rep; }                                                       \
  template<XX,YY,ZZ> inline T<X,Y,Z >&                                  \
  T<X,Y,Z >::operator = (const T<X,Y,Z >& x) {                          \
    INC_COUNT (x.rep); DEC_COUNT (rep);                                 \
    rep=x.rep; return *this; }                                          \
  template<XX,YY,ZZ> inline void T<X,Y,Z >::secure () {                 \
    if (rep->ref_count>1) *this= copy (*this); }                        \
  template<XX,YY,ZZ> R<X,Y,Z >* inside (const T<X,Y,Z >& x) {           \
    return const_cast<R<X,Y,Z >*> (x.operator -> ()); }                 \
  template<XX,YY,ZZ> inline nat hard_hash (const T<X,Y,Z>& x) {         \
    return as_hash (x.operator -> ()); }                                \
  template<XX,YY,ZZ> inline bool                                        \
  hard_eq (const T<X,Y,Z >& x, const T<X,Y,Z >& y) {                    \
    return (x.operator -> ()) == (y.operator -> ()); }                  \
  template<XX,YY,ZZ> inline bool                                        \
  hard_neq (const T<X,Y,Z >& x, const T<X,Y,Z >& y) {                   \
    return (x.operator -> ()) != (y.operator -> ()); }

Definition at line 286 of file basix.hpp.

#define INDIRECT_IMPL_4 (   T,
  R,
  WW,
  W,
  XX,
  X,
  YY,
  Y,
  ZZ,
 
)
Value:
template<WW,XX,YY,ZZ> inline T<W,X,Y,Z >::T (R<W,X,Y,Z >* rep2):        \
    rep(rep2) {}                                                        \
  template<WW,XX,YY,ZZ> inline                                          \
  T<W,X,Y,Z >::T (const R<W,X,Y,Z >* rep2, bool inc):                   \
    rep((R<W,X,Y,Z >*) (void*) rep2) { (void) inc; INC_COUNT (rep); }   \
  template<WW,XX,YY,ZZ> inline T<W,X,Y,Z >::T (const T<W,X,Y,Z >& x):   \
    rep(x.rep) { INC_COUNT (rep); }                                     \
  template<WW,XX,YY,ZZ> inline T<W,X,Y,Z >::~T () { DEC_COUNT (rep); }  \
  template<WW,XX,YY,ZZ> inline const R<W,X,Y,Z >*                       \
  T<W,X,Y,Z >::operator -> () const {                                   \
    return rep; }                                                       \
  template<WW,XX,YY,ZZ> inline T<W,X,Y,Z >&                             \
  T<W,X,Y,Z >::operator = (const T<W,X,Y,Z >& x) {                      \
    INC_COUNT (x.rep); DEC_COUNT (rep);                                 \
    rep=x.rep; return *this; }                                          \
  template<WW,XX,YY,ZZ> inline void T<W,X,Y,Z >::secure () {            \
    if (rep->ref_count>1) *this= copy (*this); }                        \
  template<WW,XX,YY,ZZ> R<W,X,Y,Z >* inside (const T<W,X,Y,Z >& x) {    \
    return const_cast<R<W,X,Y,Z >*> (x.operator -> ()); }               \
  template<WW,XX,YY,ZZ> inline nat hard_hash (const T<W,X,Y,Z>& x) {    \
    return as_hash (x.operator -> ()); }                                \
  template<WW,XX,YY,ZZ> inline bool                                     \
  hard_eq (const T<W,X,Y,Z >& x, const T<W,X,Y,Z >& y) {                \
    return (x.operator -> ()) == (y.operator -> ()); }                  \
  template<WW,XX,YY,ZZ> inline bool                                     \
  hard_neq (const T<W,X,Y,Z >& x, const T<W,X,Y,Z >& y) {               \
    return (x.operator -> ()) != (y.operator -> ()); }

Definition at line 315 of file basix.hpp.

#define INDIRECT_NULL_IMPL (   T,
 
)
Value:
inline T::T (R* rep2): rep(rep2) {}                                     \
  inline T::T (const R* rep2, bool with_inc):                           \
    rep((R*) (void*) rep2) { (void) with_inc; INC_NULL_COUNT (rep); }   \
  inline T::T (const T& x): rep(x.rep) { INC_NULL_COUNT (rep); }        \
  inline T::~T () { DEC_NULL_COUNT (rep); }                             \
  inline const R* T::operator -> () const { return rep; }               \
  inline T& T::operator = (const T& x) {                                \
    INC_NULL_COUNT (x.rep); DEC_NULL_COUNT (rep);                       \
    rep=x.rep; return *this; }                                          \
  inline void T::secure () {                                            \
    if (rep->ref_count>1) *this= copy (*this); }                        \
  inline R* inside (const T& x) {                                       \
    return const_cast<R*> (x.operator -> ()); }                         \
  STMPL inline nat hard_hash (const T& x) {                             \
    return as_hash (x.operator -> ()); }                                \
  STMPL inline bool hard_eq (const T& x, const T& y) {                  \
    return (x.operator -> ()) == (y.operator -> ()); }                  \
  STMPL inline bool hard_neq (const T& x, const T& y) {                 \
    return (x.operator -> ()) != (y.operator -> ()); }

Definition at line 189 of file basix.hpp.

#define INDIRECT_NULL_IMPL_1 (   T,
  R,
  XX,
 
)
Value:
template<XX> inline T<X >::T (R<X >* rep2): rep(rep2) {}                  \
  template<XX> inline T<X >::T (const R<X >* rep2, bool with_inc):        \
    rep((R<X >*) (void*) rep2) { (void) with_inc; INC_NULL_COUNT (rep); } \
  template<XX> inline T<X >::T (const T<X >& x): rep(x.rep) {             \
    INC_NULL_COUNT (rep); }                                               \
  template<XX> inline T<X >::~T () { DEC_NULL_COUNT (rep); }              \
  template<XX> inline const R<X >* T<X >::operator -> () const {          \
    return rep; }                                                         \
  template<XX> inline R<X >* T<X >::operator -> () {                      \
    return rep; }                                                         \
  template<XX> inline T<X >&                                              \
  T<X >::operator = (const T<X >& x) {                                    \
    INC_NULL_COUNT (x.rep); DEC_NULL_COUNT (rep);                         \
    rep=x.rep; return *this; }                                            \
  template<XX> inline void T<X >::secure () {                             \
    if (rep->ref_count>1) *this= copy (*this); }                          \
  template<XX> R<X >* inside (const T<X >& x) {                           \
    return const_cast<R<X >*> (x.operator -> ()); }                       \
  template<XX> inline nat hard_hash (const T<X >& x) {                    \
    return as_hash (x.operator -> ()); }                                  \
  template<XX> inline bool hard_eq (const T<X >& x, const T<X >& y) {     \
    return (x.operator -> ()) == (y.operator -> ()); }                    \
  template<XX> inline bool hard_neq (const T<X >& x, const T<X >& y) {    \
    return (x.operator -> ()) != (y.operator -> ()); }

Definition at line 236 of file basix.hpp.

#define INDIRECT_PROTO (   T,
 
)
Value:
MMX_ALLOCATORS                                  \
protected:                                      \
  R* rep;                                       \
public:                                         \
  inline T (R* rep2);                           \
  inline T (const R* rep2, bool with_inc);      \
  inline T (const T& x);                        \
  inline ~T ();                                 \
  inline T& operator= (const T& x);             \
  inline const R* operator-> () const;          \
  inline void secure ();

Prototype of the target class T with representation R.

Definition at line 57 of file basix.hpp.

#define INDIRECT_PROTO_1 (   T,
  R,
 
)
Value:
MMX_ALLOCATORS                                  \
protected:                                      \
  R<X >* rep;                                   \
public:                                         \
  inline T (R<X >* rep2);                       \
  inline T (const R<X >* rep2, bool with_inc);  \
  inline T (const T& x);                        \
  inline ~T ();                                 \
  inline T& operator= (const T& x);             \
  inline const R<X >* operator-> () const;      \
  inline R<X >* operator-> ();                  \
  inline void secure ();                        \
  typedef X value_type;

Prototype of the target class T<X> with representation R<X>

Definition at line 72 of file basix.hpp.

#define INDIRECT_PROTO_2 (   T,
  R,
  X,
 
)
Value:
MMX_ALLOCATORS                                  \
protected:                                      \
  R<X,Y >* rep;                                 \
public:                                         \
  inline T (R<X,Y >* rep2);                     \
  inline T (const R<X,Y >* rep2, bool inc);     \
  inline T (const T& x);                        \
  inline ~T ();                                 \
  inline T& operator= (const T& x);             \
  inline const R<X,Y >* operator-> () const;    \
  inline void secure ();

Prototype of the target class T<X,Y> with representation R<X,Y>

Definition at line 89 of file basix.hpp.

#define INDIRECT_PROTO_3 (   T,
  R,
  X,
  Y,
 
)
Value:
MMX_ALLOCATORS                                  \
protected:                                      \
  R<X,Y,Z >* rep;                               \
public:                                         \
  inline T (R<X,Y,Z >* rep2);                   \
  inline T (const R<X,Y,Z >* rep2, bool inc);   \
  inline T (const T& x);                        \
  inline ~T ();                                 \
  inline T& operator= (const T& x);             \
  inline const R<X,Y,Z >* operator-> () const;  \
  inline void secure ();

Prototype of the target class T<X,Y,Z> with representation R<X,Y,Z>

Definition at line 104 of file basix.hpp.

#define INDIRECT_PROTO_4 (   T,
  R,
  W,
  X,
  Y,
 
)
Value:
MMX_ALLOCATORS                                  \
protected:                                      \
  R<W,X,Y,Z >* rep;                             \
public:                                         \
  inline T (R<W,X,Y,Z >* rep2);                 \
  inline T (const R<W,X,Y,Z >* rep2, bool inc); \
  inline T (const T& x);                        \
  inline ~T ();                                 \
  inline T& operator= (const T& x);             \
  inline const R<W,X,Y,Z >* operator-> () const;\
  inline void secure ();

Prototype of the target class T<W,X,Y,Z> with representation R<W,X,Y,Z>

Definition at line 119 of file basix.hpp.

#define LESSGTR   <>

Definition at line 34 of file basix.hpp.

Referenced by mmx::REP_STRUCT_1(), and mmx::REP_STRUCT_2().

#define REP_STRUCT   :public rep_struct

Definition at line 143 of file basix.hpp.

#define REP_STRUCT_1 (   X)    :public rep_struct, public format<X >

Definition at line 144 of file basix.hpp.

#define REP_STRUCT_2 (   X,
 
)    :public rep_struct, public encapsulate1<format<X > >, public encapsulate2<format<Y> >

Definition at line 145 of file basix.hpp.

#define STMPL   template<>

Definition at line 35 of file basix.hpp.

#define Threshold (   C,
  Th 
)    threshold_helper<C,Th >::impl::val

Definition at line 411 of file basix.hpp.

#define Threshold_1 (   C,
  Th,
 
)    threshold_helper_1<C,Th>::val(d)

Definition at line 427 of file basix.hpp.

#define uintptr_t   unsigned long int

Definition at line 23 of file basix.hpp.

Referenced by mmx::as_hash().


Function Documentation

double hypot ( double  ,
double   
) const
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines