basix_doc 0.1
/Users/mourrain/Devel/mmx/basix/src/generic.cpp File Reference
#include <basix/compound.hpp>
#include <basix/evaluator.hpp>
#include <basix/vector.hpp>
#include <basix/tuple.hpp>
#include <basix/mmx_syntax.hpp>
#include <basix/memoize.hpp>
#include <basix/string.hpp>
#include <basix/table.hpp>
#include <basix/routine.hpp>

Go to the source code of this file.

Namespaces

Defines

Functions

Variables


Define Documentation

#define ACC_BINARY (   code,
  x1,
  x2 
)
Value:
if (same_type (x1, x2)) {                               \
    routine* r= x1->acc_apply (code);                   \
    if (r != NULL && !is_nil (*r))                      \
      return (*r) (x1, x2);                             \
  }                                                     \
  else {                                                \
    routine* cv= x1->acc_construct (x2->acc_id ());     \
    if (cv != NULL && !is_nil (*cv)) {                  \
      routine* r= x1->acc_apply (code);                 \
      if (r != NULL && !is_nil (*r))                    \
        return (*r) (x1, (*cv) (x2));                   \
    }                                                   \
    cv= x2->acc_construct (x1->acc_id ());              \
    if (cv != NULL && !is_nil (*cv)) {                  \
      routine* r= x2->acc_apply (code);                 \
      if (r != NULL && !is_nil (*r))                    \
        return (*r) ((*cv) (x1), x2);                   \
    }                                                   \
  }

Definition at line 299 of file generic.cpp.

Referenced by mmx::atan2(), mmx::hypot(), mmx::operator*(), mmx::operator+(), mmx::operator-(), mmx::operator/(), and mmx::pow().

#define ACC_BINARY_SCALAR (   code,
  x1,
  x2 
)
Value:
routine* r= x1->acc_apply (code);                       \
  if (r != NULL && !is_nil (*r)) return (*r) (x1, x2);

Definition at line 341 of file generic.cpp.

Referenced by mmx::derive(), and mmx::integrate().

#define ACC_TEST (   code,
  x1,
  x2 
)
Value:
if (same_type (x1, x2)) {                               \
    routine* r= x1->acc_apply (code);                   \
    if (r != NULL && !is_nil (*r))                      \
      return as_bool ((*r) (x1, x2));                   \
  }                                                     \
  else {                                                \
    routine* cv= x1->acc_construct (x2->acc_id ());     \
    if (cv != NULL && !is_nil (*cv)) {                  \
      routine* r= x1->acc_apply (code);                 \
      if (r != NULL && !is_nil (*r))                    \
        return as_bool ((*r) (x1, (*cv) (x2)));         \
    }                                                   \
    cv= x2->acc_construct (x1->acc_id ());              \
    if (cv != NULL && !is_nil (*cv)) {                  \
      routine* r= x2->acc_apply (code);                 \
      if (r != NULL && !is_nil (*r))                    \
        return as_bool ((*r) ((*cv) (x1), x2));         \
    }                                                   \
  }

Definition at line 320 of file generic.cpp.

Referenced by mmx::operator<(), mmx::operator<=(), mmx::operator>(), and mmx::operator>=().

#define ACC_UNARY (   code,
  x1 
)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines