Hitmap 1.3
 All Data Structures Namespaces Files Functions Variables Typedefs Friends Macros Groups Pages
Functions | Variables
mmult_csr.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <hitmap.h>
#include <hit_com.h>
#include <sys/time.h>
#include <unistd.h>
Include dependency graph for mmult_csr.c:

Go to the source code of this file.

Functions

 hit_tileNewType (double)
 
void mult (HitTile_double M, HitTile_double b, HitTile_double c)
 
double vector_norm (HitTile_double v)
 
void print_help (char *name)
 
void init_matrix (int argc, char **argv, HitShape *shape)
 
int main (int argc, char **argv)
 

Variables

HitLayout lay = HIT_LAYOUT_NULL_STATIC
 
HitLayout lay_v = HIT_LAYOUT_NULL_STATIC
 
int iter = 100
 

Detailed Description

Sparse matrix - vector multiplication benchmark (with CSR structure)

Author
Javier Fresno
Date
10-7-2012
Version
1.0 (17-4-2012)
1.1 (10-7-2012)

Definition in file mmult_csr.c.

Function Documentation

hit_tileNewType ( double  )

Hit double tile

void init_matrix ( int  argc,
char **  argv,
HitShape shape 
)

Init the matrix structure

Parameters
argc
argv

Definition at line 158 of file mmult_csr.c.

Here is the call graph for this function:

int main ( int  argc,
char **  argv 
)

Main function.

Parameters
argc
argv
Returns

Definition at line 214 of file mmult_csr.c.

Here is the call graph for this function:

void mult ( HitTile_double  M,
HitTile_double  b,
HitTile_double  c 
)

Multiply the matrix M and the vector b and return the vector c.

Parameters
MA sparse matrix
bA dense vector
cA dense vector as result

Definition at line 77 of file mmult_csr.c.

void print_help ( char *  name)

Print help msg.

Parameters
nameName of the program

Definition at line 146 of file mmult_csr.c.

double vector_norm ( HitTile_double  v)

Calculate the norm of a vector

Parameters
vThe vector
Returns
The vector norm

Definition at line 104 of file mmult_csr.c.

Here is the call graph for this function:

Variable Documentation

int iter = 100

Number of iterations

Definition at line 67 of file mmult_csr.c.

Layout to distribute the matrix

Definition at line 52 of file mmult_csr.c.

Layout to distribute the vector

Definition at line 57 of file mmult_csr.c.