Class CooMatrix<T>
- Namespace
- NVMathNet.Sparse
- Assembly
- NVMath.Net.dll
A sparse matrix stored in COOrdinate (COO) format on the GPU.
public sealed class CooMatrix<T> : IDisposable where T : unmanaged, INumberBase<T>Type Parameters
T-
Unmanaged numeric value element type (float, double, etc.).
Inheritance
Implements
Inherited Members
Constructors
CooMatrix(long, long, DeviceBuffer<int>, DeviceBuffer<int>, DeviceBuffer<T>)
Creates a COO sparse matrix from pre-allocated device buffers.
public CooMatrix(long rows, long cols, DeviceBuffer<int> rowIndices, DeviceBuffer<int> colIndices, DeviceBuffer<T> values)Parameters
rowslongcolslongrowIndicesDeviceBuffer<int>colIndicesDeviceBuffer<int>valuesDeviceBuffer<T>
Properties
ColIndices
Column indices — length NNZ.
public DeviceBuffer<int> ColIndices { get; }Property Value
Cols
Number of columns.
public long Cols { get; }Property Value
NNZ
Number of non-zero elements.
public long NNZ { get; }Property Value
RowIndices
Row indices — length NNZ.
public DeviceBuffer<int> RowIndices { get; }Property Value
Rows
Number of rows.
public long Rows { get; }Property Value
Values
Non-zero values — length NNZ.
public DeviceBuffer<T> Values { get; }Property Value
- DeviceBuffer<T>
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()