Hitmap 1.3
 All Data Structures Namespaces Files Functions Variables Typedefs Friends Macros Groups Pages
Macros | Functions
hit_file.c File Reference
#include <hit_file.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include <hit_error.h>
#include <hit_allocP.h>
#include <hit_funcop.h>
#include <hit_cshape.h>
#include <hit_bshape.h>
#include "matrix_io.h"
Include dependency graph for hit_file.c:

Go to the source code of this file.

Macros

#define INCLUDE_MATRIX_IO__H
 
#define NUMBERS_LINE   10
 
#define NUMBERS_SIZE   8
 
#define NUMBERS_LINE   10
 
#define NUMBERS_SIZE   8
 

Functions

int compare_idxtype (const void *a, const void *b)
 
void hit_csr_renameIndexes (int Nr, int *xadj, int *adjncy)
 
int hit_csr_renameIndexes_and_Symmetrize (int *pNr, int *pNc, int nz, int **pxadj, int **padjncy, const char *file, int line)
 
HitShape hit_fileMMRead_toCSR_Internal (const char *fileName, int create_graph, int rank, const char *file, int line)
 
HitShape hit_fileHBRead_toCSR_Internal (const char *fileName, int create_graph, int rank, const char *file, int line)
 
HitShape hit_fileHBRead_toBitmap_Internal (const char *fileName, int create_graph, int rank, const char *file, int line)
 
void hit_fileHBWriteInternal (const char *hbfile, HitShape shape, int rank, const char *cfile, int cline)
 
void hit_fileHBWriteBitmapInternal (const char *hbfile, HitShape shape, int rank, const char *cfile, int cline)
 
int hit_fileHBVerticesInternal (const char *hbfile, int rank, const char *file, int line)
 
int hit_fileHBReadDenseInternal (const char *fileName, int rank, void *tileP, const char *file, int line)
 
HitShape hit_fileCSRReadInternal (const char *csrfile, int rank, const char *cfile, int line)
 
void hit_fileCSRWriteInternal (const char *csrfile, HitShape shape, int rank, const char *cfile, int line)
 

Detailed Description

Types and functions to work with files.

Version
1.1
Author
Arturo Gonzalez-Escribano
Javier Fresno Bausela
Date
Jul 2011

Definition in file hit_file.c.

Macro Definition Documentation

#define INCLUDE_MATRIX_IO__H

Definition at line 55 of file hit_file.c.

#define NUMBERS_LINE   10
#define NUMBERS_LINE   10
#define NUMBERS_SIZE   8
#define NUMBERS_SIZE   8

Function Documentation

int compare_idxtype ( const void *  a,
const void *  b 
)

Compare function for idxtype, to be used in stdlib's qsort(3).

Parameters
aPointer to an idxtype.
bPointer to an idxtype.
Returns
An integer less than, equal to, or greater than zero if the first argument is less than, equal to, or greater than the second.

Definition at line 66 of file hit_file.c.

Here is the caller graph for this function:

void hit_csr_renameIndexes ( int  Nr,
int *  xadj,
int *  adjncy 
)

Definition at line 72 of file hit_file.c.

Here is the caller graph for this function:

int hit_csr_renameIndexes_and_Symmetrize ( int *  pNr,
int *  pNc,
int  nz,
int **  pxadj,
int **  padjncy,
const char *  file,
int  line 
)

Definition at line 86 of file hit_file.c.

Here is the call graph for this function:

Here is the caller graph for this function:

HitShape hit_fileCSRReadInternal ( const char *  csrfile,
int  rank,
const char *  cfile,
int  line 
)
Todo:
Adapt the CSR input/output functions to the new sparse structure. The new sparse structure support bipartite graphs with two different vertex lists. This avoids coping all the vertices for the source and target of the edge. This functions do not consider this change. In fact, HB format do not support it neither so a conversion is needed.

Definition at line 942 of file hit_file.c.

Here is the call graph for this function:

void hit_fileCSRWriteInternal ( const char *  csrfile,
HitShape  shape,
int  rank,
const char *  cfile,
int  line 
)

Definition at line 1008 of file hit_file.c.

HitShape hit_fileHBRead_toBitmap_Internal ( const char *  fileName,
int  create_graph,
int  rank,
const char *  file,
int  line 
)

Definition at line 466 of file hit_file.c.

Here is the call graph for this function:

HitShape hit_fileHBRead_toCSR_Internal ( const char *  fileName,
int  create_graph,
int  rank,
const char *  file,
int  line 
)

Definition at line 340 of file hit_file.c.

Here is the call graph for this function:

int hit_fileHBReadDenseInternal ( const char *  hbfile,
int  rank,
void *  tileP,
const char *  file,
int  line 
)

Reads a Harwell-Boeing graph and writes it in a square adjancency matrix.

Note
Needs a HitTile of integers.

Definition at line 816 of file hit_file.c.

Here is the call graph for this function:

int hit_fileHBVerticesInternal ( const char *  hbfile,
int  rank,
const char *  file,
int  line 
)

Reads the number of vertices from a Harwell-Boeing graph file.

Definition at line 778 of file hit_file.c.

Here is the call graph for this function:

void hit_fileHBWriteBitmapInternal ( const char *  hbfile,
HitShape  shape,
int  rank,
const char *  cfile,
int  cline 
)

Definition at line 664 of file hit_file.c.

void hit_fileHBWriteInternal ( const char *  hbfile,
HitShape  shape,
int  rank,
const char *  file,
int  line 
)

Output function for CSR and Bitmap shapes to HB.

Note
http://people.sc.fsu.edu/~jburkardt/data/hb/hb.html
Todo:
Add another output function for Dense.

Definition at line 573 of file hit_file.c.

HitShape hit_fileMMRead_toCSR_Internal ( const char *  fileName,
int  create_graph,
int  rank,
const char *  file,
int  line 
)

Definition at line 246 of file hit_file.c.

Here is the call graph for this function: