PIPS
vectransform.c File Reference
#include <stdlib.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "resources.h"
#include "ri-util.h"
#include "effects-util.h"
#include "sac.h"
+ Include dependency graph for vectransform.c:

Go to the source code of this file.

Functions

void insert_transformation (char *name, int vectorLengthOut, int subwordSizeOut, int vectorLengthIn, int subwordSizeIn, int nbArgs, list mapping)
 vectransform.c More...
 

Variables

static list transformations = NIL
 transformation> More...
 

Function Documentation

◆ insert_transformation()

void insert_transformation ( char *  name,
int  vectorLengthOut,
int  subwordSizeOut,
int  vectorLengthIn,
int  subwordSizeIn,
int  nbArgs,
list  mapping 
)

vectransform.c

Parameters
nameame
vectorLengthOutectorLengthOut
subwordSizeOutubwordSizeOut
vectorLengthInectorLengthIn
subwordSizeInubwordSizeIn
nbArgsbArgs
mappingapping

Definition at line 43 of file vectransform.c.

44 {
45  int i;
46  list l;
48  vectorLengthOut,
49  subwordSizeOut,
50  vectorLengthIn,
51  subwordSizeIn,
52  nbArgs,
53  (int*)malloc(sizeof(int)*vectorLengthOut));
54 
55  for(i = vectorLengthOut-1, l=mapping; (i>=0) && (l!=NIL); i--, l=CDR(l))
56  transformation_mapping(t)[i] = INT(CAR(l));
57 
59 }
transformation make_transformation(string a1, intptr_t a2, intptr_t a3, intptr_t a4, intptr_t a5, intptr_t a6, int *a7)
Definition: sac_private.c:510
@ INT
Definition: atomic.c:48
void * malloc(YYSIZE_T)
#define NIL
The empty list (nil in Lisp)
Definition: newgen_list.h:47
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
Definition: newgen_list.h:150
#define CAR(pcons)
Get the value of the first element of a list.
Definition: newgen_list.h:92
#define CDR(pcons)
Get the list less its first element.
Definition: newgen_list.h:111
#define transformation_mapping(x)
Definition: sac_private.h:589
#define TRANSFORMATION(x)
TRANSFORMATION.
Definition: sac_private.h:542
char * strdup()
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
static list transformations
transformation>
Definition: vectransform.c:41

References CAR, CDR, CONS, INT, make_transformation(), malloc(), NIL, strdup(), TRANSFORMATION, transformation_mapping, and transformations.

+ Here is the call graph for this function:

Variable Documentation

◆ transformations

list transformations = NIL
static

transformation>

Definition at line 41 of file vectransform.c.

Referenced by insert_transformation(), and make_pre_post_transformation().