Table of Contents

Class SparseCompressionResult<T>

Namespace
AiDotNet.ModelCompression
Assembly
AiDotNet.dll

Result of sparse compression operation.

public class SparseCompressionResult<T>

Type Parameters

T

Numeric type.

Inheritance
SparseCompressionResult<T>
Inherited Members

Properties

BlockIndices

Block indices (for block-sparse format).

public int[]? BlockIndices { get; init; }

Property Value

int[]

BlockSize

Block size for block-sparse format.

public int BlockSize { get; init; }

Property Value

int

ColumnIndices

Column indices (for COO, CSC formats).

public int[]? ColumnIndices { get; init; }

Property Value

int[]

ColumnPointers

Column pointers (for CSC format).

public int[]? ColumnPointers { get; init; }

Property Value

int[]

Format

The sparse format used.

public required SparseFormat Format { get; init; }

Property Value

SparseFormat

NonZeroCount

Number of non-zero elements.

public int NonZeroCount { get; }

Property Value

int

OriginalShape

Original dense shape.

public required int[] OriginalShape { get; init; }

Property Value

int[]

RowIndices

Row indices (for COO, CSR formats).

public int[]? RowIndices { get; init; }

Property Value

int[]

RowPointers

Row pointers (for CSR format).

public int[]? RowPointers { get; init; }

Property Value

int[]

Sparsity

Sparsity ratio (fraction of zeros).

public double Sparsity { get; }

Property Value

double

SparsityM

M value for N:M sparsity patterns.

public int SparsityM { get; init; }

Property Value

int

SparsityMask

Mask for 2:4 or N:M structured sparsity.

public byte[]? SparsityMask { get; init; }

Property Value

byte[]

SparsityN

N value for N:M sparsity patterns.

public int SparsityN { get; init; }

Property Value

int

Values

Non-zero values.

public required T[] Values { get; init; }

Property Value

T[]

Methods

GetCompressedSizeBytes(int)

Gets the compressed size in bytes.

public long GetCompressedSizeBytes(int elementSize)

Parameters

elementSize int

Returns

long