FAUST compiler  0.9.9.6b8
Functions
recSchema.cpp File Reference
#include "recSchema.h"
#include <iostream>
#include <assert.h>
Include dependency graph for recSchema.cpp:

Go to the source code of this file.

Functions

schemamakeRecSchema (schema *s1, schema *s2)
 Creates a new recursive schema (s1 ~ s2).

Function Documentation

schema* makeRecSchema ( schema s1,
schema s2 
)

Creates a new recursive schema (s1 ~ s2).

The smallest component is enlarged to the width of the other. The left and right horizontal margins are computed according to the number of internal connections.

Definition at line 34 of file recSchema.cpp.

References dWire, makeEnlargedSchema(), max(), and schema::width().

Referenced by generateInsideSchema().

{
    schema* a = makeEnlargedSchema(s1, s2->width());
    schema* b = makeEnlargedSchema(s2, s1->width());
    double  m = dWire * max(b->inputs(), b->outputs());
    double  w = a->width() + 2*m;

    return new recSchema(a,b,w);
}

Here is the call graph for this function:

Here is the caller graph for this function: