Clan  0.8.0
Functions
vector.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <osl/int.h>
#include <osl/vector.h>
#include <clan/macros.h>
#include <clan/symbol.h>
#include <clan/vector.h>
Include dependency graph for vector.c:

Go to the source code of this file.

Functions

osl_vector_p clan_vector_term (clan_symbol_p symbol, int coefficient, char *identifier, int precision)

Function Documentation

osl_vector_p clan_vector_term ( clan_symbol_p  symbol,
int  coefficient,
char *  identifier,
int  precision 
) [read]

clan_vector_term function: This function generates the vector representation of a term. It allocates a vector with maximal size and puts the term value at the right place depending if the term is a constant, an iterator coefficient or a parameter coefficient (see the structure of an OpenScop row if unsure!).

Parameters:
[in]symbolThe first node of the list of symbols.
[in]coefficientThe constant or coefficient.
[in]identifierIdentifier of iterator or parameter (NULL for constant).
[in]precisionPrecision of the vector terms.
Returns:
A vector corresponding to the symbol and its coefficient.

Definition at line 67 of file vector.c.

References CLAN_MAX_DEPTH, CLAN_MAX_LOCAL_DIMS, CLAN_MAX_PARAMETERS, clan_symbol_get_rank(), clan_symbol_get_type(), and CLAN_TYPE_ITERATOR.

Referenced by yyparse().