Mir 1.0
Mir application programming interface

Macros

#define MIR_FVEC2FMC_ROWS   1
 
#define MIR_FVEC2FMC_COLS   2
 

Functions

mirkl_error_tmir_fmc_instance_create (mirkl_object_t **obj, mirkl_size_t nRows, mirkl_size_t nCols, double **vals, mirkl_uint32_t flags, mir_prsdata_t *pp, apr_pool_t *pool, apr_pool_t *tmp_pool)
 
mirkl_error_tmir_fmc_instance_create_from_vector (mirkl_object_t **obj, mirkl_size_t nRows, mirkl_size_t nCols, double *vals, unsigned int cflag, mirkl_uint32_t flags, mir_prsdata_t *pp, apr_pool_t *pool, apr_pool_t *tmp_pool)
 
mirkl_error_tmir_fmc_set_data (mirkl_object_t *obj, mirkl_size_t nRows, mirkl_size_t nCols, double **vals)
 
mirkl_error_tmir_fmc_set_data_from_vector (mirkl_object_t *obj, mirkl_size_t nRows, mirkl_size_t nCols, double *vals, unsigned int cflag)
 
mirkl_error_tmir_fmc_set_data_all_same (mirkl_object_t *obj, mirkl_size_t nRows, mirkl_size_t nCols, double val)
 
mirkl_error_tmir_fmc_get_data (mirkl_object_t *obj, mirkl_size_t *nRows, mirkl_size_t *nCols, double ***vals)
 
mirkl_error_tmir_fmc_get_data_ptr (mirkl_object_t *obj, mirkl_size_t *rows_tot, mirkl_size_t *cols_tot, int *distributed, mirkl_size_t *row_offset, mirkl_size_t *col_offset, mirkl_size_t *rows_loc, mirkl_size_t *cols_loc, double ***vals)
 

Variables

mirkl_object_t * MirFMatrixClass
 Float Matrix class.
 

Detailed Description

Function Documentation

◆ mir_fmc_get_data_ptr()

mirkl_error_t * mir_fmc_get_data_ptr ( mirkl_object_t *  obj,
mirkl_size_t *  rows_tot,
mirkl_size_t *  cols_tot,
int *  distributed,
mirkl_size_t *  row_offset,
mirkl_size_t *  col_offset,
mirkl_size_t *  rows_loc,
mirkl_size_t *  cols_loc,
double ***  vals 
)

Getting pointers to the data of FMatrix instance for fast access.

Parameters
objObject from which the data to be retrieved.
valsarray of values on the output.
Note
This function can be used to query only selected parameters, the others can be NULL on input.

◆ mir_fmc_instance_create()

mirkl_error_t * mir_fmc_instance_create ( mirkl_object_t **  obj,
mirkl_size_t  nRows,
mirkl_size_t  nCols,
double **  vals,
mirkl_uint32_t  flags,
mir_prsdata_t *  pp,
apr_pool_t *  pool,
apr_pool_t *  tmp_pool 
)

Creation of FMatrix object.

Note
Created matrix is not distributed over MPI nodes.
Parameters
[out]objReference to the created object.
nRowsNumber of rows for initialization.
nColsNumber of columns for initialization.
valsArray of values for initialization. Zero matrix is created if it is NULL.
flagsFlags of the object.
ppReference to the parser data structure.
poolThe pool to use for allocations of object structures. Should be valid as long as the created object lives.
tmp_poolThe pool for temporary allocations. Can be deleted after calling this function.

◆ mir_fmc_instance_create_from_vector()

mirkl_error_t * mir_fmc_instance_create_from_vector ( mirkl_object_t **  obj,
mirkl_size_t  nRows,
mirkl_size_t  nCols,
double *  vals,
unsigned int  cflag,
mirkl_uint32_t  flags,
mir_prsdata_t *  pp,
apr_pool_t *  pool,
apr_pool_t *  tmp_pool 
)

Creation of FMatrix object using 1D-array for initialization.

Note
Created matrix is not distributed over MPI nodes.
Parameters
[out]objReference to the created object.
nRowsNumber of rows for initialization.
nColsNumber of columns for initialization.
valsArray of values for initialization. Zero matrix is created if it is NULL.
cflagCopying pattern, one of MIR_FVEC2FMC_
flagsFlags of the object.
ppReference to the parser data structure.
poolThe pool to use for allocations of object structures. Should be valid as long as the created object lives.
tmp_poolThe pool for temporary allocations. Can be deleted after calling this function.

◆ mir_fmc_set_data()

mirkl_error_t * mir_fmc_set_data ( mirkl_object_t *  obj,
mirkl_size_t  nRows,
mirkl_size_t  nCols,
double **  vals 
)

Setting data for FMatrix object.

Parameters
objReference to the existing object.
nRowsNumber of rows for initialization.
nColsNumber of columns for initialization.
valsArray of values for initialization.
Note
If vals is NULL then the matrix is just resized to nRows-x-nCols.
Matrix can be distributed over MPI nodes.

◆ mir_fmc_set_data_from_vector()

mirkl_error_t * mir_fmc_set_data_from_vector ( mirkl_object_t *  obj,
mirkl_size_t  nRows,
mirkl_size_t  nCols,
double *  vals,
unsigned int  cflag 
)

Setting data for FMatrix object from 1D-array.

Parameters
objReference to the existing object.
nRowsNumber of rows for initialization.
nColsNumber of columns for initialization.
vals1D-array of values for initialization.
cflagCopying pattern, one of MIR_FVEC2FMC_
Note
If vals is NULL then the matrix is just resized to nRows-x-nCols.
Matrix can be distributed over MPI nodes.