KIDS  ver-0.0.1
KIDS : Kernel Integrated Dynamics Simulator
Loading...
Searching...
No Matches
SparseMat< T > Class Template Reference

#include <sparse_utils.h>

Collaboration diagram for SparseMat< T >:
Collaboration graph

Public Types

enum  { RowMajor , ColMajor }
 

Public Member Functions

 SparseMat (T *A, const int &N, const int &M, const int &major=RowMajor)
 
int Push (const int &n, const int &m, const T &val)
 
int Fix ()
 
int MatMul (T *A, T *B)
 
int Show ()
 
virtual ~SparseMat ()
 

Private Attributes

bool fixed = false
 
int LDA
 
int _LLDA
 
int _major
 
int size
 
int * csr_LDA
 
int * csr_conn
 
int _nallow
 
T * _val
 
std::vector< int > vec_conn {}
 
std::vector< T > vec_val {}
 

Detailed Description

template<class T>
class SparseMat< T >

Definition at line 6 of file sparse_utils.h.

Member Enumeration Documentation

◆ anonymous enum

template<class T >
anonymous enum
Enumerator
RowMajor 
ColMajor 

Definition at line 8 of file sparse_utils.h.

Constructor & Destructor Documentation

◆ SparseMat()

template<class T >
SparseMat< T >::SparseMat ( T * A,
const int & N,
const int & M,
const int & major = RowMajor )
inline

◆ ~SparseMat()

template<class T >
virtual SparseMat< T >::~SparseMat ( )
inlinevirtual

Member Function Documentation

◆ Fix()

template<class T >
int SparseMat< T >::Fix ( )
inline

◆ MatMul()

template<class T >
int SparseMat< T >::MatMul ( T * A,
T * B )
inline

◆ Push()

template<class T >
int SparseMat< T >::Push ( const int & n,
const int & m,
const T & val )
inline

◆ Show()

template<class T >
int SparseMat< T >::Show ( )
inline

Member Data Documentation

◆ _LLDA

template<class T >
int SparseMat< T >::_LLDA
private

Definition at line 100 of file sparse_utils.h.

Referenced by SparseMat< T >::Show(), and SparseMat< T >::SparseMat().

◆ _major

template<class T >
int SparseMat< T >::_major
private

Definition at line 100 of file sparse_utils.h.

Referenced by SparseMat< T >::Push(), and SparseMat< T >::SparseMat().

◆ _nallow

template<class T >
int SparseMat< T >::_nallow
private

◆ _val

template<class T >
T* SparseMat< T >::_val
private

◆ csr_conn

template<class T >
int* SparseMat< T >::csr_conn
private

◆ csr_LDA

◆ fixed

template<class T >
bool SparseMat< T >::fixed = false
private

Definition at line 99 of file sparse_utils.h.

Referenced by SparseMat< T >::Fix(), and SparseMat< T >::~SparseMat().

◆ LDA

template<class T >
int SparseMat< T >::LDA
private

◆ size

template<class T >
int SparseMat< T >::size
private

◆ vec_conn

template<class T >
std::vector<int> SparseMat< T >::vec_conn {}
private

Definition at line 106 of file sparse_utils.h.

Referenced by SparseMat< T >::Fix(), and SparseMat< T >::Push().

◆ vec_val

template<class T >
std::vector<T> SparseMat< T >::vec_val {}
private

Definition at line 107 of file sparse_utils.h.

Referenced by SparseMat< T >::Fix(), and SparseMat< T >::Push().


The documentation for this class was generated from the following file: