SpM Handbook 1.2.4
Loading...
Searching...
No Matches
spm_read_driver.c File Reference
#include "common.h"
#include "spm_drivers.h"

Go to the source code of this file.

Functions

static int spm_read_scotch (const char *filename, spmatrix_t *spm)
 Import a sparse matrix from a Scotch data file.
 
static int spm_read_driver (int scatter, spm_driver_t driver, const char *filename, spmatrix_t *spm, SPM_Comm comm)
 Import a matrix file into a spm structure for a specific communicator.
 
SPM driver
int spmReadDriverDist (spm_driver_t driver, const char *filename, spmatrix_t *spm, SPM_Comm comm)
 Import a matrix file into an spm structure for a specific communicator.
 
int spmReadDriver (spm_driver_t driver, const char *filename, spmatrix_t *spm)
 Import a matrix file into a spm structure.
 

Detailed Description

SParse Matrix package file driver.

Version
1.2.4
Author
Mathieu Faverge
Pierre Ramet
Matias Hastaran
Tony Delarue
Alycia Lisito
Date
2024-06-26

Definition in file spm_read_driver.c.

Function Documentation

◆ spm_read_scotch()

static int spm_read_scotch ( const char *  filename,
spmatrix_t spm 
)
static

Import a sparse matrix from a Scotch data file.

Parameters
[in]filenameThe name of the file that stores the matrix (see driver).
[in,out]spmOn entry, an allocated sparse matrix structure. On exit, the filled sparse matrix structure with the matrix from the file.
Return values
SPM_SUCCESSif the file reading happened successfully,
SPM_ERR_BADPARAMETERif one the parameter is incorrect.

Definition at line 47 of file spm_read_driver.c.

References spmatrix_s::baseval, spmatrix_s::colptr, spmatrix_s::dof, spmatrix_s::flttype, spmatrix_s::fmttype, spmatrix_s::mtxtype, spmatrix_s::n, spmatrix_s::nnz, spmatrix_s::replicated, spmatrix_s::rowptr, SPM_ERR_BADPARAMETER, SPM_ERR_FILE, SPM_ERR_INTEGER_TYPE, SPM_SUCCESS, SpmCSC, SpmGeneral, SpmPattern, and spmUpdateComputedFields().

Referenced by spm_read_driver().