Browse Source

Sparse Solver: change the enums' values to the values defined by MKL DSS.

v4
Jong Hyun Kim 7 years ago
parent
commit
550d56c884
  1. 70
      src/NativeProviders/MKL/dss.c
  2. 12
      src/Numerics.Tests/Providers/SparseSolver/double/SparseSolverProviderTests.cs
  3. 16
      src/Numerics/Providers/Experimental.cs
  4. 39
      src/Numerics/Providers/SparseSolver/ISparseSolverProvider.cs
  5. 16
      src/Numerics/Providers/SparseSolver/Mkl/MklSparseSolverProvider.Complex.cs
  6. 16
      src/Numerics/Providers/SparseSolver/Mkl/MklSparseSolverProvider.Complex32.cs
  7. 16
      src/Numerics/Providers/SparseSolver/Mkl/MklSparseSolverProvider.Double.cs
  8. 16
      src/Numerics/Providers/SparseSolver/Mkl/MklSparseSolverProvider.Single.cs

70
src/NativeProviders/MKL/dss.c

@ -14,20 +14,15 @@ extern "C" {
_MKL_DSS_HANDLE_t handle; _MKL_DSS_HANDLE_t handle;
dss_int error; dss_int error;
dss_int opt = MKL_DSS_MSG_LVL_WARNING + MKL_DSS_TERM_LVL_ERROR + MKL_DSS_ZERO_BASED_INDEXING + MKL_DSS_AUTO_ORDER + MKL_DSS_SINGLE_PRECISION; dss_int opt = MKL_DSS_MSG_LVL_WARNING + MKL_DSS_TERM_LVL_ERROR + MKL_DSS_ZERO_BASED_INDEXING + MKL_DSS_AUTO_ORDER;
if (systemType) opt += MKL_DSS_TRANSPOSE_SOLVE; // solve a transposed system, A'x = b opt += systemType;
// Initialize the solver // Initialize the solver
error = dss_create(handle, opt); error = dss_create(handle, opt);
if (error != MKL_DSS_SUCCESS) return error; if (error != MKL_DSS_SUCCESS) return error;
// Define the non-zero structure of the matrix // Define the non-zero structure of the matrix
dss_int sym = (matrixStructure == 0) error = dss_define_structure(handle, matrixStructure, rowIdx, nRows, nCols, colPtr, nnz);
? MKL_DSS_SYMMETRIC_STRUCTURE
: (matrixStructure == 1)
? MKL_DSS_SYMMETRIC
: MKL_DSS_NON_SYMMETRIC;
error = dss_define_structure(handle, sym, rowIdx, nRows, nCols, colPtr, nnz);
if (error != MKL_DSS_SUCCESS) return error; if (error != MKL_DSS_SUCCESS) return error;
// Reorder the matrix // Reorder the matrix
@ -35,10 +30,7 @@ extern "C" {
if (error != MKL_DSS_SUCCESS) return error; if (error != MKL_DSS_SUCCESS) return error;
// Factor the matrix // Factor the matrix
dss_int type = (matrixType == 0) error = dss_factor_real(handle, matrixType, values);
? MKL_DSS_POSITIVE_DEFINITE
: MKL_DSS_INDEFINITE;
error = dss_factor_real(handle, type, values);
if (error != MKL_DSS_SUCCESS) return error; if (error != MKL_DSS_SUCCESS) return error;
// Get the solution vector // Get the solution vector
@ -58,19 +50,14 @@ extern "C" {
dss_int error; dss_int error;
dss_int opt = MKL_DSS_MSG_LVL_WARNING + MKL_DSS_TERM_LVL_ERROR + MKL_DSS_ZERO_BASED_INDEXING + MKL_DSS_AUTO_ORDER; dss_int opt = MKL_DSS_MSG_LVL_WARNING + MKL_DSS_TERM_LVL_ERROR + MKL_DSS_ZERO_BASED_INDEXING + MKL_DSS_AUTO_ORDER;
if (systemType) opt += MKL_DSS_TRANSPOSE_SOLVE; // solve a transposed system, A'x = b opt += systemType;
// Initialize the solver // Initialize the solver
error = dss_create(handle, opt); error = dss_create(handle, opt);
if (error != MKL_DSS_SUCCESS) return error; if (error != MKL_DSS_SUCCESS) return error;
// Define the non-zero structure of the matrix // Define the non-zero structure of the matrix
dss_int sym = (matrixStructure == 0) error = dss_define_structure(handle, matrixStructure, rowIdx, nRows, nCols, colPtr, nnz);
? MKL_DSS_SYMMETRIC_STRUCTURE
: (matrixStructure == 1)
? MKL_DSS_SYMMETRIC
: MKL_DSS_NON_SYMMETRIC;
error = dss_define_structure(handle, sym, rowIdx, nRows, nCols, colPtr, nnz);
if (error != MKL_DSS_SUCCESS) return error; if (error != MKL_DSS_SUCCESS) return error;
// Reorder the matrix // Reorder the matrix
@ -78,10 +65,7 @@ extern "C" {
if (error != MKL_DSS_SUCCESS) return error; if (error != MKL_DSS_SUCCESS) return error;
// Factor the matrix // Factor the matrix
dss_int type = (matrixType == 0) error = dss_factor_real(handle, matrixType, values);
? MKL_DSS_POSITIVE_DEFINITE
: MKL_DSS_INDEFINITE;
error = dss_factor_real(handle, type, values);
if (error != MKL_DSS_SUCCESS) return error; if (error != MKL_DSS_SUCCESS) return error;
// Get the solution vector // Get the solution vector
@ -100,21 +84,15 @@ extern "C" {
_MKL_DSS_HANDLE_t handle; _MKL_DSS_HANDLE_t handle;
dss_int error; dss_int error;
dss_int opt = MKL_DSS_MSG_LVL_WARNING + MKL_DSS_TERM_LVL_ERROR + MKL_DSS_ZERO_BASED_INDEXING + MKL_DSS_AUTO_ORDER + MKL_DSS_SINGLE_PRECISION; dss_int opt = MKL_DSS_MSG_LVL_WARNING + MKL_DSS_TERM_LVL_ERROR + MKL_DSS_ZERO_BASED_INDEXING + MKL_DSS_AUTO_ORDER;
if (systemType == 1) opt += MKL_DSS_CONJUGATE_SOLVE; // solve a conjugate transposed system, A¢Óx = b opt += systemType;
else if(systemType == 2) opt += MKL_DSS_TRANSPOSE_SOLVE; // solve a transposed system, A'x = b
// Initialize the solver // Initialize the solver
error = dss_create(handle, opt); error = dss_create(handle, opt);
if (error != MKL_DSS_SUCCESS) return error; if (error != MKL_DSS_SUCCESS) return error;
// Define the non-zero structure of the matrix // Define the non-zero structure of the matrix
dss_int sym = (matrixStructure == 0) error = dss_define_structure(handle, matrixStructure, rowIdx, nRows, nCols, colPtr, nnz);
? MKL_DSS_SYMMETRIC_STRUCTURE_COMPLEX
: (matrixStructure == 1)
? MKL_DSS_SYMMETRIC_COMPLEX
: MKL_DSS_NON_SYMMETRIC_COMPLEX;
error = dss_define_structure(handle, sym, rowIdx, nRows, nCols, colPtr, nnz);
if (error != MKL_DSS_SUCCESS) return error; if (error != MKL_DSS_SUCCESS) return error;
// Reorder the matrix // Reorder the matrix
@ -122,14 +100,7 @@ extern "C" {
if (error != MKL_DSS_SUCCESS) return error; if (error != MKL_DSS_SUCCESS) return error;
// Factor the matrix // Factor the matrix
dss_int type = (matrixType == 0) error = dss_factor_complex(handle, matrixType, values);
? MKL_DSS_POSITIVE_DEFINITE
: (matrixType == 1)
? MKL_DSS_INDEFINITE
: (matrixType == 2)
? MKL_DSS_HERMITIAN_POSITIVE_DEFINITE
: MKL_DSS_HERMITIAN_INDEFINITE;
error = dss_factor_complex(handle, type, values);
if (error != MKL_DSS_SUCCESS) return error; if (error != MKL_DSS_SUCCESS) return error;
// Get the solution vector // Get the solution vector
@ -149,20 +120,14 @@ extern "C" {
dss_int error; dss_int error;
dss_int opt = MKL_DSS_MSG_LVL_WARNING + MKL_DSS_TERM_LVL_ERROR + MKL_DSS_ZERO_BASED_INDEXING + MKL_DSS_AUTO_ORDER; dss_int opt = MKL_DSS_MSG_LVL_WARNING + MKL_DSS_TERM_LVL_ERROR + MKL_DSS_ZERO_BASED_INDEXING + MKL_DSS_AUTO_ORDER;
if (systemType == 1) opt += MKL_DSS_CONJUGATE_SOLVE; // solve a conjugate transposed system, A¢Óx = b opt += systemType;
else if (systemType == 2) opt += MKL_DSS_TRANSPOSE_SOLVE; // solve a transposed system, A'x = b
// Initialize the solver // Initialize the solver
error = dss_create(handle, opt); error = dss_create(handle, opt);
if (error != MKL_DSS_SUCCESS) return error; if (error != MKL_DSS_SUCCESS) return error;
// Define the non-zero structure of the matrix // Define the non-zero structure of the matrix
dss_int sym = (matrixStructure == 0) error = dss_define_structure(handle, matrixStructure, rowIdx, nRows, nCols, colPtr, nnz);
? MKL_DSS_SYMMETRIC_STRUCTURE_COMPLEX
: (matrixStructure == 1)
? MKL_DSS_SYMMETRIC_COMPLEX
: MKL_DSS_NON_SYMMETRIC_COMPLEX;
error = dss_define_structure(handle, sym, rowIdx, nRows, nCols, colPtr, nnz);
if (error != MKL_DSS_SUCCESS) return error; if (error != MKL_DSS_SUCCESS) return error;
// Reorder the matrix // Reorder the matrix
@ -170,14 +135,7 @@ extern "C" {
if (error != MKL_DSS_SUCCESS) return error; if (error != MKL_DSS_SUCCESS) return error;
// Factor the matrix // Factor the matrix
dss_int type = (matrixType == 0) error = dss_factor_complex(handle, matrixType, values);
? MKL_DSS_POSITIVE_DEFINITE
: (matrixType == 1)
? MKL_DSS_INDEFINITE
: (matrixType == 2)
? MKL_DSS_HERMITIAN_POSITIVE_DEFINITE
: MKL_DSS_HERMITIAN_INDEFINITE;
error = dss_factor_complex(handle, type, values);
if (error != MKL_DSS_SUCCESS) return error; if (error != MKL_DSS_SUCCESS) return error;
// Get the solution vector // Get the solution vector

12
src/Numerics.Tests/Providers/SparseSolver/double/SparseSolverProviderTests.cs

@ -15,7 +15,7 @@ namespace MathNet.Numerics.UnitTests.Providers.SparseSolver.Double
/// <summary> /// <summary>
/// Base class for sparse solver provider tests. /// Base class for sparse solver provider tests.
/// </summary> /// </summary>
[TestFixture, Category("LAProvider")] [TestFixture, Category("SparseSolverProvider")]
public class SparseSolverProviderTests public class SparseSolverProviderTests
{ {
readonly double[] _b4 = { 1.0, 2.0, 3.0, 4.0}; readonly double[] _b4 = { 1.0, 2.0, 3.0, 4.0};
@ -51,7 +51,7 @@ namespace MathNet.Numerics.UnitTests.Providers.SparseSolver.Double
var xactual = new double[rowCount]; var xactual = new double[rowCount];
var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Symmetric, DssMatrixType.PositiveDefinite, DssSystemType.NonTransposed, var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Symmetric, DssMatrixType.PositiveDefinite, DssSystemType.DontTranspose,
rowCount, columnCount, valueCount, rowPointers, columnIndices, values, rowCount, columnCount, valueCount, rowPointers, columnIndices, values,
1, _b5, xactual); 1, _b5, xactual);
@ -83,7 +83,7 @@ namespace MathNet.Numerics.UnitTests.Providers.SparseSolver.Double
var xactual = new double[rowCount]; var xactual = new double[rowCount];
var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.NonTransposed, var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.DontTranspose,
rowCount, columnCount, valueCount, rowPointers, columnIndices, values, rowCount, columnCount, valueCount, rowPointers, columnIndices, values,
1, _b5, xactual); 1, _b5, xactual);
@ -115,7 +115,7 @@ namespace MathNet.Numerics.UnitTests.Providers.SparseSolver.Double
var xactual = new double[rowCount]; var xactual = new double[rowCount];
var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.NonTransposed, var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.DontTranspose,
rowCount, columnCount, valueCount, rowPointers, columnIndices, values, rowCount, columnCount, valueCount, rowPointers, columnIndices, values,
1, _b4, xactual); 1, _b4, xactual);
@ -150,7 +150,7 @@ namespace MathNet.Numerics.UnitTests.Providers.SparseSolver.Double
var b = Identity.ToColumnMajorArray(); var b = Identity.ToColumnMajorArray();
var Xactual = new double[rowCount * columnCount]; var Xactual = new double[rowCount * columnCount];
var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Symmetric, DssMatrixType.PositiveDefinite, DssSystemType.NonTransposed, var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Symmetric, DssMatrixType.PositiveDefinite, DssSystemType.DontTranspose,
rowCount, columnCount, valueCount, rowPointers, columnIndices, values, rowCount, columnCount, valueCount, rowPointers, columnIndices, values,
Identity.ColumnCount, b, Xactual); Identity.ColumnCount, b, Xactual);
@ -520,7 +520,7 @@ namespace MathNet.Numerics.UnitTests.Providers.SparseSolver.Double
var rhs = Rhs.ToArray(); var rhs = Rhs.ToArray();
var solution = new double[rowCount]; var solution = new double[rowCount];
SparseSolverControl.Provider.Solve(DssMatrixStructure.Symmetric, DssMatrixType.Indefinite, DssSystemType.NonTransposed, SparseSolverControl.Provider.Solve(DssMatrixStructure.Symmetric, DssMatrixType.Indefinite, DssSystemType.DontTranspose,
rowCount, columnCount, valueCount, rowPointers, columnIndices, values, rowCount, columnCount, valueCount, rowPointers, columnIndices, values,
1, rhs, solution); 1, rhs, solution);

16
src/Numerics/Providers/Experimental.cs

@ -84,7 +84,7 @@ namespace MathNet.Numerics
var rhs = input.ToArray(); var rhs = input.ToArray();
var solution = new float[rowCount]; var solution = new float[rowCount];
var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.NonTransposed, var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.DontTranspose,
rowCount, columnCount, valueCount, rowPointers, columnIndices, values, rowCount, columnCount, valueCount, rowPointers, columnIndices, values,
1, rhs, solution); 1, rhs, solution);
@ -132,7 +132,7 @@ namespace MathNet.Numerics
var rhs = input.ToArray(); var rhs = input.ToArray();
var solution = new double[rowCount]; var solution = new double[rowCount];
var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.NonTransposed, var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.DontTranspose,
rowCount, columnCount, valueCount, rowPointers, columnIndices, values, rowCount, columnCount, valueCount, rowPointers, columnIndices, values,
1, rhs, solution); 1, rhs, solution);
@ -180,7 +180,7 @@ namespace MathNet.Numerics
var rhs = input.ToArray(); var rhs = input.ToArray();
var solution = new Complex32[rowCount]; var solution = new Complex32[rowCount];
var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.NonTransposed, var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.DontTranspose,
rowCount, columnCount, valueCount, rowPointers, columnIndices, values, rowCount, columnCount, valueCount, rowPointers, columnIndices, values,
1, rhs, solution); 1, rhs, solution);
@ -228,7 +228,7 @@ namespace MathNet.Numerics
var rhs = input.ToArray(); var rhs = input.ToArray();
var solution = new Complex[rowCount]; var solution = new Complex[rowCount];
var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.NonTransposed, var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.DontTranspose,
rowCount, columnCount, valueCount, rowPointers, columnIndices, values, rowCount, columnCount, valueCount, rowPointers, columnIndices, values,
1, rhs, solution); 1, rhs, solution);
@ -279,7 +279,7 @@ namespace MathNet.Numerics
var solution = new float[rowCount * nRhs]; var solution = new float[rowCount * nRhs];
var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.NonTransposed, var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.DontTranspose,
rowCount, columnCount, valueCount, rowPointers, columnIndices, values, rowCount, columnCount, valueCount, rowPointers, columnIndices, values,
nRhs, rhs, solution); nRhs, rhs, solution);
@ -328,7 +328,7 @@ namespace MathNet.Numerics
var solution = new double[rowCount * nRhs]; var solution = new double[rowCount * nRhs];
var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.NonTransposed, var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.DontTranspose,
rowCount, columnCount, valueCount, rowPointers, columnIndices, values, rowCount, columnCount, valueCount, rowPointers, columnIndices, values,
nRhs, rhs, solution); nRhs, rhs, solution);
@ -377,7 +377,7 @@ namespace MathNet.Numerics
var solution = new Complex32[rowCount * nRhs]; var solution = new Complex32[rowCount * nRhs];
var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.NonTransposed, var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.DontTranspose,
rowCount, columnCount, valueCount, rowPointers, columnIndices, values, rowCount, columnCount, valueCount, rowPointers, columnIndices, values,
nRhs, rhs, solution); nRhs, rhs, solution);
@ -426,7 +426,7 @@ namespace MathNet.Numerics
var solution = new Complex[rowCount * nRhs]; var solution = new Complex[rowCount * nRhs];
var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.NonTransposed, var error = SparseSolverControl.Provider.Solve(DssMatrixStructure.Nonsymmetric, DssMatrixType.Indefinite, DssSystemType.DontTranspose,
rowCount, columnCount, valueCount, rowPointers, columnIndices, values, rowCount, columnCount, valueCount, rowPointers, columnIndices, values,
nRhs, rhs, solution); nRhs, rhs, solution);

39
src/Numerics/Providers/SparseSolver/ISparseSolverProvider.cs

@ -2,37 +2,52 @@
namespace MathNet.Numerics.Providers.SparseSolver namespace MathNet.Numerics.Providers.SparseSolver
{ {
/// <summary>
/// Structure option.
/// </summary>
public enum DssMatrixStructure : int public enum DssMatrixStructure : int
{ {
SymmetricStructure = 0, Symmetric = 536870976,
Symmetric = 1, SymmetricStructure = 536871040,
Nonsymmetric = 2 Nonsymmetric = 536871104,
SymmetricComplex = 536871168,
SymmetricStructureComplex = 536871232,
NonsymmetricComplex = 536871296,
} }
/// <summary>
/// Factorization option.
/// </summary>
public enum DssMatrixType : int public enum DssMatrixType : int
{ {
PositiveDefinite = 0, PositiveDefinite = 134217792,
Indefinite = 1, Indefinite = 134217856,
HermitianPositiveDefinite = 2, HermitianPositiveDefinite = 134217920,
HermitianIndefinite = 3 HermitianIndefinite = 134217984
} }
/// <summary>
/// Solver step's substitution.
/// </summary>
public enum DssSystemType : int public enum DssSystemType : int
{ {
/// <summary> /// <summary>
/// Solve a system, Ax = b. /// Solve a system, Ax = b.
/// </summary> /// </summary>
NonTransposed = 0, DontTranspose = 0,
/// <summary> /// <summary>
/// Solve a conjugate transposed system, A†x = b /// Solve a transposed system, A'x = b
/// </summary> /// </summary>
ConjugateTransposed = 1, Transpose = 262144,
/// <summary> /// <summary>
/// Solve a transposed system, A'x = b /// Solve a conjugate transposed system, A†x = b
/// </summary> /// </summary>
Transposed = 2 ConjugateTranspose = 524288,
} }
/// <summary>
/// Status values
/// </summary>
public enum DssStatus : int public enum DssStatus : int
{ {
/// <summary> /// <summary>

16
src/Numerics/Providers/SparseSolver/Mkl/MklSparseSolverProvider.Complex.cs

@ -13,6 +13,22 @@ namespace MathNet.Numerics.Providers.SparseSolver.Mkl
/// </summary> /// </summary>
internal partial class MklSparseSolverProvider internal partial class MklSparseSolverProvider
{ {
/// <summary>
/// Solves sparse linear systems of equations, <b>AX = B</b>.
/// </summary>
/// <param name="matrixStructure">The symmetricity of the matrix. For a symmetric matrix, only upper ot lower triangular matrix is used.</param>
/// <param name="matrixType">The definiteness of the matrix.</param>
/// <param name="systemType">The type of the systems.</param>
/// <param name="rowCount">The number of rows of matrix.</param>
/// <param name="columnCount">The number of columns of matrix.</param>
/// <param name="nonZerosCount">The number of non zero elements of matrix.</param>
/// <param name="rowPointers">The array containing the row indices of the existing rows.</param>
/// <param name="columnIndices">The array containing the column indices of the non-zero values</param>
/// <param name="values">The array that contains the non-zero elements of matrix. No diagonal element can be ommitted. </param>
/// <param name="nRhs">The number of columns of the right hand side matrix.</param>
/// <param name="rhs">The right hand side matrix</param>
/// <param name="solution">The left hand side matrix</param>
/// <returns>The status of the solver.</returns>
[SecuritySafeCritical] [SecuritySafeCritical]
public override DssStatus Solve(DssMatrixStructure matrixStructure, DssMatrixType matrixType, DssSystemType systemType, public override DssStatus Solve(DssMatrixStructure matrixStructure, DssMatrixType matrixType, DssSystemType systemType,
int rowCount, int columnCount, int nonZerosCount, int[] rowPointers, int[] columnIndices, Complex[] values, int rowCount, int columnCount, int nonZerosCount, int[] rowPointers, int[] columnIndices, Complex[] values,

16
src/Numerics/Providers/SparseSolver/Mkl/MklSparseSolverProvider.Complex32.cs

@ -12,6 +12,22 @@ namespace MathNet.Numerics.Providers.SparseSolver.Mkl
/// </summary> /// </summary>
internal partial class MklSparseSolverProvider internal partial class MklSparseSolverProvider
{ {
/// <summary>
/// Solves sparse linear systems of equations, <b>AX = B</b>.
/// </summary>
/// <param name="matrixStructure">The symmetricity of the matrix. For a symmetric matrix, only upper ot lower triangular matrix is used.</param>
/// <param name="matrixType">The definiteness of the matrix.</param>
/// <param name="systemType">The type of the systems.</param>
/// <param name="rowCount">The number of rows of matrix.</param>
/// <param name="columnCount">The number of columns of matrix.</param>
/// <param name="nonZerosCount">The number of non zero elements of matrix.</param>
/// <param name="rowPointers">The array containing the row indices of the existing rows.</param>
/// <param name="columnIndices">The array containing the column indices of the non-zero values</param>
/// <param name="values">The array that contains the non-zero elements of matrix. No diagonal element can be ommitted. </param>
/// <param name="nRhs">The number of columns of the right hand side matrix.</param>
/// <param name="rhs">The right hand side matrix</param>
/// <param name="solution">The left hand side matrix</param>
/// <returns>The status of the solver.</returns>
[SecuritySafeCritical] [SecuritySafeCritical]
public override DssStatus Solve(DssMatrixStructure matrixStructure, DssMatrixType matrixType, DssSystemType systemType, public override DssStatus Solve(DssMatrixStructure matrixStructure, DssMatrixType matrixType, DssSystemType systemType,
int rowCount, int columnCount, int nonZerosCount, int[] rowPointers, int[] columnIndices, Complex32[] values, int rowCount, int columnCount, int nonZerosCount, int[] rowPointers, int[] columnIndices, Complex32[] values,

16
src/Numerics/Providers/SparseSolver/Mkl/MklSparseSolverProvider.Double.cs

@ -12,6 +12,22 @@ namespace MathNet.Numerics.Providers.SparseSolver.Mkl
/// </summary> /// </summary>
internal partial class MklSparseSolverProvider internal partial class MklSparseSolverProvider
{ {
/// <summary>
/// Solves sparse linear systems of equations, <b>AX = B</b>.
/// </summary>
/// <param name="matrixStructure">The symmetricity of the matrix. For a symmetric matrix, only upper ot lower triangular matrix is used.</param>
/// <param name="matrixType">The definiteness of the matrix.</param>
/// <param name="systemType">The type of the systems.</param>
/// <param name="rowCount">The number of rows of matrix.</param>
/// <param name="columnCount">The number of columns of matrix.</param>
/// <param name="nonZerosCount">The number of non zero elements of matrix.</param>
/// <param name="rowPointers">The array containing the row indices of the existing rows.</param>
/// <param name="columnIndices">The array containing the column indices of the non-zero values</param>
/// <param name="values">The array that contains the non-zero elements of matrix. No diagonal element can be ommitted. </param>
/// <param name="nRhs">The number of columns of the right hand side matrix.</param>
/// <param name="rhs">The right hand side matrix</param>
/// <param name="solution">The left hand side matrix</param>
/// <returns>The status of the solver.</returns>
[SecuritySafeCritical] [SecuritySafeCritical]
public override DssStatus Solve(DssMatrixStructure matrixStructure, DssMatrixType matrixType, DssSystemType systemType, public override DssStatus Solve(DssMatrixStructure matrixStructure, DssMatrixType matrixType, DssSystemType systemType,
int rowCount, int columnCount, int nonZerosCount, int[] rowPointers, int[] columnIndices, double[] values, int rowCount, int columnCount, int nonZerosCount, int[] rowPointers, int[] columnIndices, double[] values,

16
src/Numerics/Providers/SparseSolver/Mkl/MklSparseSolverProvider.Single.cs

@ -12,6 +12,22 @@ namespace MathNet.Numerics.Providers.SparseSolver.Mkl
/// </summary> /// </summary>
internal partial class MklSparseSolverProvider internal partial class MklSparseSolverProvider
{ {
/// <summary>
/// Solves sparse linear systems of equations, <b>AX = B</b>.
/// </summary>
/// <param name="matrixStructure">The symmetricity of the matrix. For a symmetric matrix, only upper ot lower triangular matrix is used.</param>
/// <param name="matrixType">The definiteness of the matrix.</param>
/// <param name="systemType">The type of the systems.</param>
/// <param name="rowCount">The number of rows of matrix.</param>
/// <param name="columnCount">The number of columns of matrix.</param>
/// <param name="nonZerosCount">The number of non zero elements of matrix.</param>
/// <param name="rowPointers">The array containing the row indices of the existing rows.</param>
/// <param name="columnIndices">The array containing the column indices of the non-zero values</param>
/// <param name="values">The array that contains the non-zero elements of matrix. No diagonal element can be ommitted. </param>
/// <param name="nRhs">The number of columns of the right hand side matrix.</param>
/// <param name="rhs">The right hand side matrix</param>
/// <param name="solution">The left hand side matrix</param>
/// <returns>The status of the solver.</returns>
[SecuritySafeCritical] [SecuritySafeCritical]
public override DssStatus Solve(DssMatrixStructure matrixStructure, DssMatrixType matrixType, DssSystemType systemType, public override DssStatus Solve(DssMatrixStructure matrixStructure, DssMatrixType matrixType, DssSystemType systemType,
int rowCount, int columnCount, int nonZerosCount, int[] rowPointers, int[] columnIndices, float[] values, int rowCount, int columnCount, int nonZerosCount, int[] rowPointers, int[] columnIndices, float[] values,

Loading…
Cancel
Save