tlds
Transactional Operations for Linked Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
router.c File Reference
#include <assert.h>
#include <stdlib.h>
#include "coordinate.h"
#include "grid.h"
#include "queue.h"
#include "router.h"
#include "tm.h"
#include "vector.h"
Include dependency graph for router.c:

Classes

struct  point
 

Typedefs

typedef enum momentum momentum_t
 
typedef struct point point_t
 

Enumerations

enum  momentum {
  MOMENTUM_ZERO = 0, MOMENTUM_POSX = 1, MOMENTUM_POSY = 2, MOMENTUM_POSZ = 3,
  MOMENTUM_NEGX = 4, MOMENTUM_NEGY = 5, MOMENTUM_NEGZ = 6
}
 

Functions

router_trouter_alloc (long xCost, long yCost, long zCost, long bendCost)
 
void router_free (router_t *routerPtr)
 
static void PexpandToNeighbor (grid_t *myGridPtr, long x, long y, long z, long value, queue_t *queuePtr)
 
static bool_t PdoExpansion (router_t *routerPtr, grid_t *myGridPtr, queue_t *queuePtr, coordinate_t *srcPtr, coordinate_t *dstPtr)
 
static void traceToNeighbor (grid_t *myGridPtr, point_t *currPtr, point_t *movePtr, bool_t useMomentum, long bendCost, point_t *nextPtr)
 
static vector_tPdoTraceback (grid_t *gridPtr, grid_t *myGridPtr, coordinate_t *dstPtr, long bendCost)
 
void router_solve (void *argPtr)
 

Variables

point_t MOVE_POSX = { 1, 0, 0, 0, MOMENTUM_POSX}
 
point_t MOVE_POSY = { 0, 1, 0, 0, MOMENTUM_POSY}
 
point_t MOVE_POSZ = { 0, 0, 1, 0, MOMENTUM_POSZ}
 
point_t MOVE_NEGX = {-1, 0, 0, 0, MOMENTUM_NEGX}
 
point_t MOVE_NEGY = { 0, -1, 0, 0, MOMENTUM_NEGY}
 
point_t MOVE_NEGZ = { 0, 0, -1, 0, MOMENTUM_NEGZ}
 

Typedef Documentation

typedef enum momentum momentum_t
typedef struct point point_t

Enumeration Type Documentation

enum momentum
Enumerator
MOMENTUM_ZERO 
MOMENTUM_POSX 
MOMENTUM_POSY 
MOMENTUM_POSZ 
MOMENTUM_NEGX 
MOMENTUM_NEGY 
MOMENTUM_NEGZ 

Function Documentation

static bool_t PdoExpansion ( router_t routerPtr,
grid_t myGridPtr,
queue_t queuePtr,
coordinate_t srcPtr,
coordinate_t dstPtr 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static vector_t* PdoTraceback ( grid_t gridPtr,
grid_t myGridPtr,
coordinate_t dstPtr,
long  bendCost 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void PexpandToNeighbor ( grid_t myGridPtr,
long  x,
long  y,
long  z,
long  value,
queue_t queuePtr 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

router_t* router_alloc ( long  xCost,
long  yCost,
long  zCost,
long  bendCost 
)

Here is the caller graph for this function:

void router_free ( router_t routerPtr)

Here is the caller graph for this function:

void router_solve ( void *  argPtr)

Here is the call graph for this function:

Here is the caller graph for this function:

static void traceToNeighbor ( grid_t myGridPtr,
point_t currPtr,
point_t movePtr,
bool_t  useMomentum,
long  bendCost,
point_t nextPtr 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

point_t MOVE_NEGX = {-1, 0, 0, 0, MOMENTUM_NEGX}
point_t MOVE_NEGY = { 0, -1, 0, 0, MOMENTUM_NEGY}
point_t MOVE_NEGZ = { 0, 0, -1, 0, MOMENTUM_NEGZ}
point_t MOVE_POSX = { 1, 0, 0, 0, MOMENTUM_POSX}
point_t MOVE_POSY = { 0, 1, 0, 0, MOMENTUM_POSY}
point_t MOVE_POSZ = { 0, 0, 1, 0, MOMENTUM_POSZ}