3D-ICE 3.0.0
Data Structures | Typedefs | Functions
floorplan_matrix.h File Reference
#include "types.h"
#include "string_t.h"
#include "floorplan_element_list.h"
#include "dimensions.h"

Go to the source code of this file.

Data Structures

struct  FloorplanMatrix_t
 Structure representing the matrix storing the coefficients of the floorplans tha scales power values to sources. More...
 

Typedefs

typedef struct FloorplanMatrix_t FloorplanMatrix_t
 

Functions

void floorplan_matrix_init (FloorplanMatrix_t *flpmatrix)
 
void floorplan_matrix_copy (FloorplanMatrix_t *dst, FloorplanMatrix_t *src)
 
Error_t floorplan_matrix_build (FloorplanMatrix_t *flpmatrix, CellIndex_t nrows, CellIndex_t ncolumns, CellIndex_t nnz)
 
void floorplan_matrix_destroy (FloorplanMatrix_t *flpmatrix)
 
void floorplan_matrix_fill (FloorplanMatrix_t *flpmatrix, FloorplanElementList_t *list, Dimensions_t *dimensions)
 
void floorplan_matrix_multiply (FloorplanMatrix_t *flpmatrix, Source_t *x, Source_t *b)
 
void floorplan_matrix_print (FloorplanMatrix_t flpmatrix, String_t file_name)
 

Typedef Documentation

◆ FloorplanMatrix_t

Definition of the type FloorplanMatrix_t

Definition at line 101 of file floorplan_matrix.h.

Function Documentation

◆ floorplan_matrix_build()

Error_t floorplan_matrix_build ( FloorplanMatrix_t flpmatrix,
CellIndex_t  nrows,
CellIndex_t  ncolumns,
CellIndex_t  nnz 
)

Allocates memory to store indexes and coefficients of a FloorplanMatrix

Parameters
flpmatrixthe address of the floorplan matrix
nrowsthe number of rows of the matrix
ncolumnsthe number of columns of the matrix
nnzthe number of nonzeroes coeffcients
Returns
TDICE_SUCCESS if the memory allocation succeded
TDICE_FAILURE if the memory allocation fails

Definition at line 86 of file floorplan_matrix.c.

◆ floorplan_matrix_copy()

void floorplan_matrix_copy ( FloorplanMatrix_t dst,
FloorplanMatrix_t src 
)

Copies the structure src into dst , as an assignement

The function destroys the content of dst and then makes the copy

Parameters
dstthe address of the left term sructure (destination)
srcthe address of the right term structure (source)

Definition at line 58 of file floorplan_matrix.c.

◆ floorplan_matrix_destroy()

void floorplan_matrix_destroy ( FloorplanMatrix_t flpmatrix)

Destroys the content of the fields of the structure flpmatrix

The function releases any dynamic memory used by the structure and resets its state calling floorplan_matrix_init .

Parameters
flpmatrixthe address of the structure to destroy

Definition at line 126 of file floorplan_matrix.c.

◆ floorplan_matrix_fill()

void floorplan_matrix_fill ( FloorplanMatrix_t flpmatrix,
FloorplanElementList_t *  list,
Dimensions_t dimensions 
)

Fills the floorplan matrix

The function fills, floorplan element by floorplan element, all the columns of the floorplan matrix.

Parameters
flpmatrixpointer to the floorplan matrix to fill
listpointer to the list of floorplan elements
dimensionsthe address of the dimension structure

Definition at line 145 of file floorplan_matrix.c.

◆ floorplan_matrix_init()

void floorplan_matrix_init ( FloorplanMatrix_t flpmatrix)

Inits the fields of the flpmatrix structure with default values

Parameters
flpmatrixthe address of the structure to initalize

Definition at line 46 of file floorplan_matrix.c.

◆ floorplan_matrix_multiply()

void floorplan_matrix_multiply ( FloorplanMatrix_t flpmatrix,
Source_t x,
Source_t b 
)

Performs a Matrix-Vector Multiplication x = Ab

The multiplication corresponds to the routine DGEMV y := alpha * A* x + beta * y where alpha = 1.0 and beta = 1.0 .

Parameters
flpmatrixpointer to the (floorplan) matrix A
xpointer to the output vector x
bpointer to the input vector b

Definition at line 227 of file floorplan_matrix.c.

◆ floorplan_matrix_print()

void floorplan_matrix_print ( FloorplanMatrix_t  flpmatrix,
String_t  file_name 
)

Generates a text file storing the sparse matrix

The file will contain one row of the form row-column-value" for each zero coefficient (COO format). The first row (or column) has index 1 (matlab compatibile)

Parameters
flpmatrixthe floorplan matrix structure
file_namethe name of the file to create

Definition at line 259 of file floorplan_matrix.c.