Hitmap 1.3
|
#include <stdio.h>
#include <stdlib.h>
#include <hitmap.h>
#include <hit_com.h>
#include <sys/time.h>
#include <unistd.h>
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 |
Sparse matrix - vector multiplication benchmark (with CSR structure)
Definition in file mmult_csr.c.
hit_tileNewType | ( | double | ) |
Hit double tile
void init_matrix | ( | int | argc, |
char ** | argv, | ||
HitShape * | shape | ||
) |
Init the matrix structure
argc | |
argv |
Definition at line 158 of file mmult_csr.c.
int main | ( | int | argc, |
char ** | argv | ||
) |
Main function.
argc | |
argv |
Definition at line 214 of file mmult_csr.c.
void mult | ( | HitTile_double | M, |
HitTile_double | b, | ||
HitTile_double | c | ||
) |
Multiply the matrix M and the vector b and return the vector c.
M | A sparse matrix |
b | A dense vector |
c | A dense vector as result |
Definition at line 77 of file mmult_csr.c.
void print_help | ( | char * | name | ) |
double vector_norm | ( | HitTile_double | v | ) |
Calculate the norm of a vector
v | The vector |
Definition at line 104 of file mmult_csr.c.
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.
HitLayout lay_v = HIT_LAYOUT_NULL_STATIC |
Layout to distribute the vector
Definition at line 57 of file mmult_csr.c.