BeBOP: pOSKI  v1.0.0
parallel Optimized Sparse Kernel Interface library
 All Files Functions Variables
Functions
poski_LoadMatrixHandler.c File Reference

Handle the pattern of a file stored in Harwell-Boeing or Matrix-Market format. More...

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <stdarg.h>
#include <poski/poski_loadmatcommon.h>
#include <poski/poski_print.h>

Functions

poski_sparse_matrix_t * poski_LoadMatrixFile_to_CSR (char *matfile, poski_MatFormat_t MatfileFormat)
 Read the pattern of a file stored in Harwell-Boeing or Matrix-Market format, then store a sparse matrix in CSR format.
int test_main_poski_LoadMatrixFileHandler (char *matfile)
 Test the poski_LoadMatrixHandler's routines.

Detailed Description

Handle the pattern of a file stored in Harwell-Boeing or Matrix-Market format.

This module implements the routines to read the pattern of a file stored in Harwell-Boeing or Matrix-Market format.

Attention:
Currently, only support Harwel-Boeing format. (1) Harwell-Boeing (HB) format: Modified from the HB format loader routines written by Sam Williams <swwil.nosp@m.liam.nosp@m.s@lbl.nosp@m..gov>. (2) Matrix-Market (MM) format: not supported yet.

Also, refer poski_LoadMatrix_common.c, poski_LoadMatrix_HB_to_CSR.c, poski_LoadMatrix_MM_to_CSR.c


Function Documentation

poski_sparse_matrix_t* poski_LoadMatrixFile_to_CSR ( char *  matfile,
poski_MatFormat_t  MatfileFormat 
)

Read the pattern of a file stored in Harwell-Boeing or Matrix-Market format, then store a sparse matrix in CSR format.

Parameters:
[in]matfileFile to read
[in]MatfileFormatFile format in {HB, MM}
Returns:
A sparse matrix in CSR format if success, or an error message otherwise.
int test_main_poski_LoadMatrixFileHandler ( char *  matfile)

Test the poski_LoadMatrixHandler's routines.

This routine is for testing the functionality of the poski_LoadMatrixHnalder's routines.

Returns:
0 if success, or an error message otherwise.