relation Struct Reference
[Compiler]

#include <relation_type.h>

Collaboration diagram for relation:

Collaboration graph
[legend]

Detailed Description

Most of the attributes in this structure are instance attributes that cannot be shared among relation instances, not attributes of the relation recipe for calculating them. The calculation recipe, 'share' is sharable among all relations with identical symbolic form; roughly 80+% of relations in physical models are duplicates in differing contexts. That part (calculation recipe) which is instance independent is stored in the union 'share'.

To compile really large models, these must be memory pooled and properly aligned.


Data Fields

RelationUnion * share
double residual
double multiplier
double nominal
int iscond
gl_list_tvars
dim_typed
void * externalData


Field Documentation

union RelationUnion* relation::share

Contains information mapping from the index in *vars to value slots in the calculation. Each RelationInstance has its own struct relation and vars gl_list-- if the vars list is changed for one of the instances sharing a the RelationUnion, then a new share structure must be created for that instance. If this is not done, the other instances will miscalculate or core dump. Usually just miscalculates in silence.

Should never be NULL but at creation.

double relation::multiplier

Todo:
What is this?

struct gl_list_t* relation::vars

list of RealAtomInst pointers

void* relation::externalData

null for token relations, struct BlackBoxData * for bbox, other things for other critters.


The documentation for this struct was generated from the following file:
Generated on Thu Jul 17 04:01:00 2008 for libascend by  doxygen 1.5.1