15 #include "collection.h" 34 typedef struct address2d {
67 typedef struct block_access{
73 typedef struct polReg {
91 int m_v(
int index_i,
int index_j,
scheme s,
int p,
int q);
102 int m_h(
int index_i,
int index_j,
scheme s,
int p,
int q);
112 int A_standard(
int index_i,
int index_j,
int p,
int q);
191 int compareAddress(
void *a,
void *b);
int m_v(int index_i, int index_j, scheme s, int p, int q)
Given two input indices and a PRF mapping scheme, outputs the row of the corrispondent linear registe...
Data structure used for representing a 2D address.
Definition: prf.h:34
Access p x q rectangle.
Definition: prf.h:58
int A_standard(int index_i, int index_j, int p, int q)
Given two input indices and a PRF mapping scheme, outputs the linear register index where the data is...
This access scheme allows only conflict free rectangular, row, main diagonal and secondary diagonal b...
Definition: prf.h:45
Definition: collection.h:33
linearRegister ** data
2D array of linearRegister (lists).
Definition: prf.h:74
int data
The integer stored by this node.
Definition: prf.h:29
struct list * next
Pointer to the next node.
Definition: prf.h:30
This access scheme allows only conflict free rectangular block accesses.
Definition: prf.h:44
Access qxp rectangle.
Definition: prf.h:59
Access elements in the main diagonal.
Definition: prf.h:62
PolymorphicRegister * createPolymorphicRegister(int p, int q, int linRegSize)
Allocates memory required for a Polymorphic Register and returns a pointer to it. ...
scheme
Enum containing all the available mapping scheme.
Definition: prf.h:43
int ** readBlock(PolymorphicRegister *pR, int index_i, int index_j, acc_type type)
Performs a block read on the PolymorphicRegister.
int ** computeConflicts(PolymorphicRegister *pR, int index_i, int index_j, acc_type type)
Computes the conflict matrix relative to a block read on the PolymorphicRegister. ...
Access p*q x 1 columns.
Definition: prf.h:61
Data structure used for representing a Polymorphic Register.
Definition: prf.h:73
int ** parallelReadFromPR(PolymorphicRegister *pR, int z)
Reads an array of integer at the given depth in the Polymorphic Register given as argument...
acc_type
Enum containing all the available access types.
Definition: prf.h:57
Address2d * AGU(int index_i, int index_j, int p, int q, acc_type type)
Generates all the 2D logical addresses of the elements read in a block read.
int p
Size of the first dimension of the linearRegister array.
Definition: prf.h:75
int m_h(int index_i, int index_j, scheme s, int p, int q)
Given two input indices and a PRF mapping scheme, outputs the column of the corrispondent linear regi...
void writeToPR(PolymorphicRegister *pR, int data, int index_i, int index_j)
Stores an integer at the given "logical" index in the Polymorphic Register given as argument...
Access elements in the secondary diagonal.
Definition: prf.h:63
Data structure used for representing a linearly accessible register.
Definition: prf.h:28
This access scheme allows only conflict free rectangular, column, main diagonal and secondary diagona...
Definition: prf.h:47
This access scheme allows only conflict free rectangular, column, and row block accesses.
Definition: prf.h:49
This access scheme allows only conflict free rectangular, and transposed rectangular block accesses...
Definition: prf.h:51
scheme s
Eunum which identifies the mapping scheme used by this register.
Definition: prf.h:77
Access 1 x p*q rows.
Definition: prf.h:60
int q
Size of the second dimension of the linearRegister array.
Definition: prf.h:76
int readFromPR(PolymorphicRegister *pR, int index_i, int index_j)
Reads an integer at the given "logical" index in the Polymorphic Register given as argument...