Hitmap 1.3
 All Data Structures Namespaces Files Functions Variables Typedefs Friends Macros Groups Pages
Macros | Functions
matrix_io.c File Reference
#include "my_util.h"
#include "mmio.h"
#include "matrix_io.h"
Include dependency graph for matrix_io.c:

Go to the source code of this file.

Macros

#define LINE_LEN   90
 
#define INPUT_WIDTH   80
 

Functions

void * my_malloc (int sz)
 
int random_integer (int low, int high)
 
double random_double (double low, double high)
 
int str_to_mem_unit (char *str)
 
int mm_is_valid (MM_typecode matcode)
 
int mm_read_banner (FILE *f, MM_typecode *matcode)
 
int mm_write_mtx_crd_size (FILE *f, int M, int N, int nz)
 
int mm_read_mtx_crd_size (FILE *f, int *M, int *N, int *nz)
 
int mm_read_mtx_array_size (FILE *f, int *M, int *N)
 
int mm_write_mtx_array_size (FILE *f, int M, int N)
 
int mm_read_mtx_crd_data (FILE *f, int M, int N, int nz, int I[], int J[], double val[], MM_typecode matcode)
 
int mm_read_mtx_crd_entry (FILE *f, int *I, int *J, double *real, double *imag, MM_typecode matcode)
 
int mm_read_mtx_crd (char *fname, int *M, int *N, int *nz, int **I, int **J, double **val, MM_typecode *matcode)
 
int mm_write_banner (FILE *f, MM_typecode matcode)
 
int mm_write_mtx_crd (char fname[], int M, int N, int nz, int I[], int J[], double val[], MM_typecode matcode)
 
char * mm_typecode_to_str (MM_typecode matcode)
 
void csr2csc (int n, int m, int nz, double *a, int *col_idx, int *row_start, double *csc_a, int *row_idx, int *col_start)
 
void coo2csr_in (int n, int nz, double *a, int *i_idx, int *j_idx)
 
void coo2csr (int n, int nz, double *a, int *i_idx, int *j_idx, double *csr_a, int *col_idx, int *row_start)
 
void write_csr (char *fn, int m, int n, int nz, int *row_start, int *col_idx, double *a)
 
void read_mm_matrix (char *fn, int *m, int *n, int *nz, int **i_idx, int **j_idx, double **a)
 
void read_hb_matrix (char *fn, int *m, int *n, int *nz, int **row_start, int **col_idx, double **a)
 
void sort (int *col_idx, double *a, int start, int end)
 

Macro Definition Documentation

#define INPUT_WIDTH   80

Definition at line 648 of file matrix_io.c.

#define LINE_LEN   90

Definition at line 647 of file matrix_io.c.

Function Documentation

void coo2csr ( int  n,
int  nz,
double *  a,
int *  i_idx,
int *  j_idx,
double *  csr_a,
int *  col_idx,
int *  row_start 
)

Definition at line 972 of file matrix_io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void coo2csr_in ( int  n,
int  nz,
double *  a,
int *  i_idx,
int *  j_idx 
)

Definition at line 875 of file matrix_io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void csr2csc ( int  n,
int  m,
int  nz,
double *  a,
int *  col_idx,
int *  row_start,
double *  csc_a,
int *  row_idx,
int *  col_start 
)

Definition at line 1012 of file matrix_io.c.

Here is the caller graph for this function:

int mm_is_valid ( MM_typecode  matcode)

Definition at line 78 of file matrix_io.c.

Here is the caller graph for this function:

int mm_read_banner ( FILE *  f,
MM_typecode matcode 
)

Definition at line 88 of file matrix_io.c.

Here is the caller graph for this function:

int mm_read_mtx_array_size ( FILE *  f,
int *  M,
int *  N 
)

Definition at line 215 of file matrix_io.c.

int mm_read_mtx_crd ( char *  fname,
int *  M,
int *  N,
int *  nz,
int **  I,
int **  J,
double **  val,
MM_typecode matcode 
)

Definition at line 330 of file matrix_io.c.

Here is the call graph for this function:

int mm_read_mtx_crd_data ( FILE *  f,
int  M,
int  N,
int  nz,
int  I[],
int  J[],
double  val[],
MM_typecode  matcode 
)

Definition at line 262 of file matrix_io.c.

Here is the caller graph for this function:

int mm_read_mtx_crd_entry ( FILE *  f,
int *  I,
int *  J,
double *  real,
double *  imag,
MM_typecode  matcode 
)

Definition at line 295 of file matrix_io.c.

int mm_read_mtx_crd_size ( FILE *  f,
int *  M,
int *  N,
int *  nz 
)

Definition at line 184 of file matrix_io.c.

Here is the caller graph for this function:

char* mm_typecode_to_str ( MM_typecode  matcode)

Definition at line 440 of file matrix_io.c.

Here is the caller graph for this function:

int mm_write_banner ( FILE *  f,
MM_typecode  matcode 
)

Definition at line 383 of file matrix_io.c.

int mm_write_mtx_array_size ( FILE *  f,
int  M,
int  N 
)

Definition at line 246 of file matrix_io.c.

int mm_write_mtx_crd ( char  fname[],
int  M,
int  N,
int  nz,
int  I[],
int  J[],
double  val[],
MM_typecode  matcode 
)

Definition at line 396 of file matrix_io.c.

int mm_write_mtx_crd_size ( FILE *  f,
int  M,
int  N,
int  nz 
)

Definition at line 176 of file matrix_io.c.

void* my_malloc ( int  sz)

Routines to read/write matrix.

ejim Wed Mar 4 15:16:14 PST 1998

Definition at line 12 of file matrix_io.c.

Here is the caller graph for this function:

double random_double ( double  low,
double  high 
)

Definition at line 38 of file matrix_io.c.

Here is the caller graph for this function:

int random_integer ( int  low,
int  high 
)

Definition at line 28 of file matrix_io.c.

void read_hb_matrix ( char *  fn,
int *  m,
int *  n,
int *  nz,
int **  row_start,
int **  col_idx,
double **  a 
)

Definition at line 650 of file matrix_io.c.

Here is the call graph for this function:

void read_mm_matrix ( char *  fn,
int *  m,
int *  n,
int *  nz,
int **  i_idx,
int **  j_idx,
double **  a 
)

Definition at line 553 of file matrix_io.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void sort ( int *  col_idx,
double *  a,
int  start,
int  end 
)

Definition at line 848 of file matrix_io.c.

Here is the caller graph for this function:

int str_to_mem_unit ( char *  str)

Definition at line 57 of file matrix_io.c.

void write_csr ( char *  fn,
int  m,
int  n,
int  nz,
int *  row_start,
int *  col_idx,
double *  a 
)

Definition at line 520 of file matrix_io.c.