moab
gs.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <math.h>
#include "moab/gs.hpp"

Go to the source code of this file.

Namespaces

namespace  moab
 

Class representing axis-aligned bounding box.


Defines

#define DO_SET(a, b)   b=a
#define DO_ADD(a, b)   a+=b
#define DO_MUL(a, b)   a*=b
#define DO_MIN(a, b)   if(b<a) a=b
#define DO_MAX(a, b)   if(b>a) a=b
#define DO_BPR(a, b)
#define LOOP(op)
#define LOOP(op)

Functions

static void moab::local_condense (realType *u, int op, const sint *cm)
static void moab::local_uncondense (realType *u, const sint *cm)
static void moab::local_condense_vec (realType *u, uint n, int op, const sint *cm)
static void moab::local_uncondense_vec (realType *u, uint n, const sint *cm)

Define Documentation

#define DO_ADD (   a,
 
)    a+=b

Definition at line 95 of file gs.cpp.

#define DO_BPR (   a,
 
)
Value:
do \
  { uint a_ = a; \
    uint b_ = b; \
    for(;;) { \
       if(a_<b_) \
          b_>>=1; \
       else if(b_<a_) \
          a_>>=1; \
       else break; }    \
    a = a_;                             \
  } while(0)

Definition at line 99 of file gs.cpp.

#define DO_MAX (   a,
 
)    if(b>a) a=b

Definition at line 98 of file gs.cpp.

#define DO_MIN (   a,
 
)    if(b<a) a=b

Definition at line 97 of file gs.cpp.

#define DO_MUL (   a,
 
)    a*=b

Definition at line 96 of file gs.cpp.

#define DO_SET (   a,
 
)    b=a

Definition at line 94 of file gs.cpp.

#define LOOP (   op)
Value:
do {                \
    sint i,j;                   \
    while((i=*cm++) != -1)          \
      while((j=*cm++) != -1)            \
          op(u[i],u[j]);                \
  } while(0)

Definition at line 148 of file gs.cpp.

#define LOOP (   op)
Value:
do { \
    sint i,j,k; \
    while((i=*cm++) != -1) { \
      realType *pi=u+n*i; \
      while((j=*cm++) != -1) { \
           realType *pj=u+n*j; \
           for(k=n;k;--k) { \
             op(*pi,*pj); \
             ++pi; \
             ++pj; \
           } \
      } \
    } \
  } while(0)

Definition at line 148 of file gs.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines