DHART
|
A struct to hold all necessary information for a CSR. More...
#include <graph.h>
Public Member Functions | |
bool | AreValid () |
Verify the CSR referenced by this instance is valid. More... | |
float * | CSRPtrs::data_begin () const |
Returns the base address of the data buffer More... | |
int * | CSRPtrs::inner_begin () const |
Returns the address of one-past the last element within the data buffer More... | |
int * | CSRPtrs::inner_end () const |
Returns the address of one-past the last element within the inner_indices buffer More... | |
int * | CSRPtrs::outer_begin () const |
Returns the base address of the outer_indices buffer More... | |
int * | CSRPtrs::outer_end () const |
Returns the address of one-past the last element within the outer_indices buffer More... | |
float * | CSRPtrs::row_begin (int row_number) const |
Returns the address of the first non-zero element of row_number within the CSR data buffer More... | |
float * | CSRPtrs::row_end (int row_number) const |
Returns the address of the first non-zero element of row_number + 1, i.e. the base address of the next row within the CSR data buffer More... | |
int * | CSRPtrs::col_begin (int row_number) const |
Returns the address of the element that determines the column where the first non-zero value begins within row_number More... | |
int * | CSRPtrs::col_end (int row_number) const |
Returns the address of the element that denotes the end of a 'subarray' within inner_indices More... | |
Public Attributes | |
int | nnz |
Number of non-zeros contained by the CSR. More... | |
int | rows |
Number of rows in this CSR. More... | |
int | cols |
Number of columns in this CSR. More... | |
float * | data |
Stores the coefficient values of the non-zeros. More... | |
int * | outer_indices |
Stores for each column (resp. row) the index of the first non-zero in the previous two arrays. More... | |
int * | inner_indices |
Stores the row (resp. column) indices of the non-zeros. More... | |
A struct to hold all necessary information for a CSR.
|
inline |
Verify the CSR referenced by this instance is valid.
Simply checks that all the contained arrays are not null.
Definition at line 93 of file graph.h.
References data, inner_indices, and outer_indices.
|
inline |
Returns the address of the element that determines the column where the first non-zero value begins within row_number
row_number | The desired row number for the CSR such that the address returned is of the value that dictates where the first non-zero value begins within row_number |
Definition at line 312 of file graph.h.
References inner_indices, outer_indices, and rows.
|
inline |
Returns the address of the element that denotes the end of a 'subarray' within inner_indices
row_number | The desired row number for the CSR such that the address returned is one-past the last value for a 'subarray' within inner_indices |
Definition at line 344 of file graph.h.
References CSRPtrs::inner_end(), inner_indices, outer_indices, and rows.
|
inline |
|
inline |
Returns the address of one-past the last element within the data buffer
\code // TODO example /endcode
/ inline float* CSRPtrs::data_end() const { if (nnz > 0) { return data ? data + nnz : nullptr; }
return nullptr; }
/// /// Returns the base address of the inner_indices buffer /// ///
// If the inner_indices field has not been given an address, inner_begin will return nullptr.
/*!
Definition at line 153 of file graph.h.
References inner_indices.
|
inline |
Returns the address of one-past the last element within the inner_indices buffer
\detials If the inner_indices field has not been given an address, and/or the nnz field has not been given a value, inner_end will return nullptr.
Definition at line 174 of file graph.h.
References inner_indices, and nnz.
Referenced by CSRPtrs::col_end().
|
inline |
Returns the base address of the outer_indices buffer
Definition at line 196 of file graph.h.
References outer_indices.
|
inline |
Returns the address of one-past the last element within the outer_indices buffer
Definition at line 215 of file graph.h.
References outer_indices, and rows.
|
inline |
Returns the address of the first non-zero element of row_number within the CSR data buffer
row_number | The desired row number to access within the CSR |
Definition at line 241 of file graph.h.
References data, outer_indices, and rows.
|
inline |
Returns the address of the first non-zero element of row_number + 1, i.e. the base address of the next row within the CSR data buffer
row_number | The desired row number for the CSR such that the address returned is the address pointing to the beginning element for the subsequent row |
Definition at line 274 of file graph.h.
References data, outer_indices, and rows.
int HF::SpatialStructures::CSRPtrs::cols |
float* HF::SpatialStructures::CSRPtrs::data |
Stores the coefficient values of the non-zeros.
Definition at line 59 of file graph.h.
Referenced by AreValid(), CSRPtrs::data_begin(), CSRPtrs::row_begin(), and CSRPtrs::row_end().
int* HF::SpatialStructures::CSRPtrs::inner_indices |
Stores the row (resp. column) indices of the non-zeros.
Definition at line 61 of file graph.h.
Referenced by AreValid(), CSRPtrs::col_begin(), CSRPtrs::col_end(), CSRPtrs::inner_begin(), and CSRPtrs::inner_end().
int HF::SpatialStructures::CSRPtrs::nnz |
Number of non-zeros contained by the CSR.
Definition at line 55 of file graph.h.
Referenced by CSRPtrs::inner_end(), and GetCSRPointers().
int* HF::SpatialStructures::CSRPtrs::outer_indices |
Stores for each column (resp. row) the index of the first non-zero in the previous two arrays.
Definition at line 60 of file graph.h.
Referenced by AreValid(), CSRPtrs::col_begin(), CSRPtrs::col_end(), CSRPtrs::outer_begin(), CSRPtrs::outer_end(), CSRPtrs::row_begin(), and CSRPtrs::row_end().
int HF::SpatialStructures::CSRPtrs::rows |
Number of rows in this CSR.
Definition at line 56 of file graph.h.
Referenced by CSRPtrs::col_begin(), CSRPtrs::col_end(), CSRPtrs::outer_end(), CSRPtrs::row_begin(), and CSRPtrs::row_end().