KmlScasolverMatrixCreate
Create a matrix operation handle.
Shallow copy is used during matrix creation. You need to ensure that the memory specified by the store parameter is not freed before KmlScasolverMatrixDestroy is called.
Interface Definition
C interface:
int KmlScasolverMatrixCreate(KmlScasolverMatrix **pMatrix, KmlSolverMatrixStore *store, const KmlSolverMatrixOption *basicOptions, const KmlScasolverMatrixOption *scaOptions);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
pMatrix |
KmlScasolverMatrix ** |
Matrix handle. pMatrix cannot be a null pointer. |
Input/Output |
store |
KmlSolverMatrixStore * |
Matrix format information structure, which describes only the local matrix of the current process. This parameter cannot be a null pointer. For details, see Table 1. |
Input |
basicOptions |
KmlSolverMatrixOption * |
Basic matrix configuration options. This parameter cannot be a null pointer. For details, see Table 2. |
Input |
scaOptions |
KmlScasolverMatrixOption * |
Distributed matrix configuration options. The matrices saved by all processes must be able to form a complete matrix without any duplicate parts. This parameter cannot be a null pointer. For details, see Table 1. |
Input |
Field |
Type |
Description |
|---|---|---|
fieldMask |
uint64_t |
Mask that determines to which fields the configuration is applied. If a bit is set to 1, its corresponding field uses a specified value. If a bit is set to 0, its corresponding field uses the default value. See the individual field description for configurable mask bits. |
globalNumRows |
int64_t |
Number of global matrix rows. If not specified, the default value is the same as that of KmlSolverMatrixStore::nrows. Mask bit: KMLSS_MATRIX_OPTIONS_GLOBAL_NROWS |
globalNumCols |
int64_t |
Number of global matrix columns. If not specified, the default value is the same as that of KmlSolverMatrixStore::ncols. Mask bit: KMLSS_MATRIX_OPTIONS_GLOBAL_NCOLS |
partition |
KmlScadssMatrixPartition |
Global matrix partitioning among processes. For details, see Table 2. Mask bit: KMLSS_MATRIX_OPTIONS_PARTITION |
Field |
Type |
Description |
|---|---|---|
type |
KmlScasolverMatrixPartitionType |
Matrix partitioning mode among processes. The options are as follows:
|
localBegin |
int64_t |
Bias of the current process in the global matrix. The meaning depends on the partitioning mode type. The details are as follows:
|
Return Value
Return Value |
Type |
Description |
|---|---|---|
KMLSS_NO_ERROR |
int |
Normal execution. |
KMLSS_INTERNAL_ERROR |
int |
Internal error. |
KMLSS_NULL_ARGUMENT |
int |
A null argument exists in {pMatrix, store, basicOptions, scaOptions}. |
Dependencies
#include "kml_scadss.h"