SparsityParams

#include <popsparse/SparsityParams.hpp>

Parameters used for sparse tensors.

namespace popsparse

Support for sparse matrices.

namespace dynamic

Support for dynamic sparse matrices.

Enums

enum class SparsityType

Sparsity type.

Values:

enumerator Element

Sparsity is defined at an element level.

enumerator Block

Sparsity is defined at a block level.

The matrix is made up of blocks with each of these block are either all zero or not.

enum class SparsityStructure

Sparsity structure.

Values:

enumerator Unstructured

Functions

std::ostream &operator<<(std::ostream &os, const SparsityType &t)
std::ostream &operator<<(std::ostream &os, const SparsityStructure &s)
struct SparsityParams

Public Functions

inline SparsityParams(SparsityType type_ = SparsityType::Element, SparsityStructure structure_ = SparsityStructure::Unstructured, std::array<std::size_t, 2> blockDimensions_ = {1, 1})
SparsityParams(const SparsityParams&) = default

Public Members

SparsityType type

sparsity type.

SparsityStructure structure

sparsity structure.

std::array<std::size_t, 2> blockDimensions

Block dimensions.

Friends

friend bool operator<(const SparsityParams &a, const SparsityParams &b)
friend bool operator==(const SparsityParams &a, const SparsityParams &b)
friend bool operator!=(const SparsityParams &a, const SparsityParams &b)
friend std::ostream &operator<<(std::ostream &os, const SparsityParams &p)