Next: Tree expressions of level 0, Previous: Linear constraints of level 0, Up: Level 0 of the interface
Datatypes and functions are almost isomorphic to datatypes and functions for linear constraints.
typedef enum ap_gentyp_t { AP_GEN_LINE, AP_GEN_RAY, AP_GEN_VERTEX, AP_GEN_LINEMOD, AP_GEN_RAYMOD } ap_gentyp_t;
Datatype for type of generators.
typedef struct ap_generator0_t { ap_linexpr0_t* linexpr0; /* underlying expression. */ ap_gentyp_t gentyp; /* type of generator */ } ap_generator0_t;
Datatype for generators.
The constant of the expression is ignored, and the expression is assumed to be truly linear (without intervals).
typedef struct ap_generator0_array_t { ap_generator0_t* p; size_t size; } ap_generator0_array_t;
Datatype for arrays of generators.
• Allocating generators of level 0 | ||
• Arrays of generators of level 0 | ||
• Change of dimensions and permutations of generators of level 0 |
Next: Arrays of generators of level 0, Previous: Generators of level 0, Up: Generators of level 0
Create a generator of type gentyp with the expression linexpr.
The expression is not duplicated, just pointed to, so it becomes managed via the generator.
Duplication
Clear the generator.
Print the linear generator on stream stream, using the array
name_of_dim to convert dimensions to variable names. If
name_of_dim is NULL
, the dimensions are named
x0,x1,...
.
Next: Change of dimensions and permutations of generators of level 0, Previous: Allocating generators of level 0, Up: Generators of level 0
Arrays are accessed directly, for example by writing
array->p[i]
(of type ap_generator0_t
),
array->p[i].gentyp
and array->p[i].linexpr0
.
One can assign a generator to the index index by writing:
array->p[index] = ap_generator0_make(gentyp,expr)
.
Allocate an array of size generators. The generators are initialized with NULL pointers for underlying expressions.
Clear the generators of the array, and then the array itself.
Print the array on the stream.
Previous: Arrays of generators of level 0, Up: Generators of level 0
These two functions add dimensions to the generator, following
the semantics of dimchange (see the type definition of ap_dimchange_t
).
These two functions apply the given permutation to the dimensions of gen.
Extension to arrays of the corresponding functions on generators.
Previous: Arrays of generators of level 0, Up: Generators of level 0