|
COMBINATORIAL_BLAS
1.3
|
#include <SpDCCols.h>
Classes | |
| class | SpColIter |
| Iterate over (sparse) columns of the sparse matrix. More... | |
Public Types | |
| typedef IT | LocalIT |
| typedef NT | LocalNT |
Public Member Functions | |
| SpDCCols () | |
| SpDCCols (IT size, IT nRow, IT nCol, IT nzc) | |
| SpDCCols (const SpTuples< IT, NT > &rhs, bool transpose) | |
| SpDCCols (const SpDCCols< IT, NT > &rhs) | |
| ~SpDCCols () | |
| template<typename NNT > | |
| operator SpDCCols< IT, NNT > () const | |
| NNT: New numeric type. | |
| template<typename NIT , typename NNT > | |
| operator SpDCCols< NIT, NNT > () const | |
| NNT: New numeric type, NIT: New index type. | |
| SpDCCols< IT, NT > & | operator= (const SpDCCols< IT, NT > &rhs) |
| SpDCCols< IT, NT > & | operator+= (const SpDCCols< IT, NT > &rhs) |
| SpDCCols< IT, NT > | operator() (IT ri, IT ci) const |
| SpDCCols< IT, NT > | operator() (const vector< IT > &ri, const vector< IT > &ci) const |
| bool | operator== (const SpDCCols< IT, NT > &rhs) const |
| SpColIter | begcol () |
| SpColIter | endcol () |
| SpColIter::NzIter | begnz (const SpColIter &ccol) |
| SpColIter::NzIter | endnz (const SpColIter &ccol) |
| template<typename _UnaryOperation > | |
| void | Apply (_UnaryOperation __unary_op) |
| template<typename _UnaryOperation > | |
| SpDCCols< IT, NT > * | Prune (_UnaryOperation __unary_op, bool inPlace) |
| template<typename _BinaryOperation > | |
| void | UpdateDense (NT **array, _BinaryOperation __binary_op) const |
| void | EWiseScale (NT **scaler, IT m_scaler, IT n_scaler) |
| void | EWiseMult (const SpDCCols< IT, NT > &rhs, bool exclude) |
| void | Transpose () |
| Mutator version, replaces the calling object. | |
| SpDCCols< IT, NT > | TransposeConst () const |
| Const version, doesn't touch the existing object. | |
| void | RowSplit (int numsplits) |
| void | Split (SpDCCols< IT, NT > &partA, SpDCCols< IT, NT > &partB) |
| void | Merge (SpDCCols< IT, NT > &partA, SpDCCols< IT, NT > &partB) |
| void | CreateImpl (const vector< IT > &essentials) |
| void | CreateImpl (IT size, IT nRow, IT nCol, tuple< IT, IT, NT > *mytuples) |
| Arr< IT, NT > | GetArrays () const |
| vector< IT > | GetEssentials () const |
| bool | isZero () const |
| IT | getnrow () const |
| IT | getncol () const |
| IT | getnnz () const |
| IT | getnzc () const |
| int | getnsplit () const |
| ofstream & | put (ofstream &outfile) const |
| ifstream & | get (ifstream &infile) |
| void | PrintInfo () const |
| void | PrintInfo (ofstream &out) const |
| template<typename SR > | |
| int | PlusEq_AtXBt (const SpDCCols< IT, NT > &A, const SpDCCols< IT, NT > &B) |
| template<typename SR > | |
| int | PlusEq_AtXBn (const SpDCCols< IT, NT > &A, const SpDCCols< IT, NT > &B) |
| template<typename SR > | |
| int | PlusEq_AnXBt (const SpDCCols< IT, NT > &A, const SpDCCols< IT, NT > &B) |
| template<typename SR > | |
| int | PlusEq_AnXBn (const SpDCCols< IT, NT > &A, const SpDCCols< IT, NT > &B) |
| Dcsc< IT, NT > * | GetDCSC () const |
| Dcsc< IT, NT > * | GetDCSC (int i) const |
Public Member Functions inherited from SpMat< IT, NT, SpDCCols< IT, NT > > | |
| void | Create (const vector< IT > &essentials) |
| void | Create (IT size, IT nRow, IT nCol, tuple< IT, IT, NT > *mytuples) |
| void | SpGEMM (SpMat< IT, NT, SpDCCols< IT, NT > > &A, SpMat< IT, NT, SpDCCols< IT, NT > > &B, bool isAT, bool isBT) |
| void | Split (SpMat< IT, NT, SpDCCols< IT, NT > > &partA, SpMat< IT, NT, SpDCCols< IT, NT > > &partB) |
| void | Merge (SpMat< IT, NT, SpDCCols< IT, NT > > &partA, SpMat< IT, NT, SpDCCols< IT, NT > > &partB) |
| bool | operator== (const SpMat< IT, NT, SpDCCols< IT, NT > > &rhs) const |
Static Public Attributes | |
| static const IT | esscount = static_cast<IT>(4) |
Friends | |
| class | SpDCCols |
| class | SpTuples |
| class | SpDCCols< IU, NU >::SpColIter |
| template<typename IU > | |
| void | BooleanRowSplit (SpDCCols< IU, bool > &A, int numsplits) |
| template<typename IU , typename NU1 , typename NU2 > | |
| SpDCCols< IU, typename promote_trait< NU1, NU2 > ::T_promote > | EWiseMult (const SpDCCols< IU, NU1 > &A, const SpDCCols< IU, NU2 > &B, bool exclude) |
| template<typename N_promote , typename IU , typename NU1 , typename NU2 , typename _BinaryOperation > | |
| SpDCCols< IU, N_promote > | EWiseApply (const SpDCCols< IU, NU1 > &A, const SpDCCols< IU, NU2 > &B, _BinaryOperation __binary_op, bool notB, const NU2 &defaultBVal) |
| template<typename RETT , typename IU , typename NU1 , typename NU2 , typename _BinaryOperation , typename _BinaryPredicate > | |
| SpDCCols< IU, RETT > | EWiseApply (const SpDCCols< IU, NU1 > &A, const SpDCCols< IU, NU2 > &B, _BinaryOperation __binary_op, _BinaryPredicate do_op, bool allowANulls, bool allowBNulls, const NU1 &ANullVal, const NU2 &BNullVal, const bool allowIntersect) |
| template<class SR , class NUO , class IU , class NU1 , class NU2 > | |
| SpTuples< IU, NUO > * | Tuples_AnXBn (const SpDCCols< IU, NU1 > &A, const SpDCCols< IU, NU2 > &B, bool clearA, bool clearB) |
| template<class SR , class NUO , class IU , class NU1 , class NU2 > | |
| SpTuples< IU, NUO > * | Tuples_AnXBt (const SpDCCols< IU, NU1 > &A, const SpDCCols< IU, NU2 > &B, bool clearA, bool clearB) |
| template<class SR , class NUO , class IU , class NU1 , class NU2 > | |
| SpTuples< IU, NUO > * | Tuples_AtXBn (const SpDCCols< IU, NU1 > &A, const SpDCCols< IU, NU2 > &B, bool clearA, bool clearB) |
| template<class SR , class NUO , class IU , class NU1 , class NU2 > | |
| SpTuples< IU, NUO > * | Tuples_AtXBt (const SpDCCols< IU, NU1 > &A, const SpDCCols< IU, NU2 > &B, bool clearA, bool clearB) |
| template<typename SR , typename IU , typename NU , typename RHS , typename LHS > | |
| void | dcsc_gespmv (const SpDCCols< IU, NU > &A, const RHS *x, LHS *y) |
| SpMV with dense vector. | |
| template<typename SR , typename IU , typename NUM , typename IVT , typename OVT > | |
| int | dcsc_gespmv_threaded (const SpDCCols< IU, NUM > &A, const int32_t *indx, const IVT *numx, int32_t nnzx, int32_t *&sendindbuf, OVT *&sendnumbuf, int *&sdispls, int p_c) |
| template<typename SR , typename IU , typename NUM , typename IVT , typename OVT > | |
| void | dcsc_gespmv_threaded_setbuffers (const SpDCCols< IU, NUM > &A, const int32_t *indx, const IVT *numx, int32_t nnzx, int32_t *sendindbuf, OVT *sendnumbuf, int *cnts, int *sdispls, int p_c) |
Definition at line 49 of file SpDCCols.h.
Definition at line 52 of file SpDCCols.h.
Definition at line 53 of file SpDCCols.h.
Definition at line 54 of file SpDCCols.cpp.
Definition at line 87 of file SpDCCols.cpp.
Definition at line 64 of file SpDCCols.cpp.
|
inline |
Definition at line 190 of file SpDCCols.h.
Definition at line 164 of file SpDCCols.h.
|
inline |
| ccol | Return the beginning iterator for the nonzeros of the current column |
Definition at line 179 of file SpDCCols.h.
| void SpDCCols< IT, NT >::CreateImpl | ( | const vector< IT > & | essentials | ) |
Definition at line 367 of file SpDCCols.cpp.
| void SpDCCols< IT, NT >::CreateImpl | ( | IT | size, |
| IT | nRow, | ||
| IT | nCol, | ||
| tuple< IT, IT, NT > * | mytuples | ||
| ) |
Definition at line 381 of file SpDCCols.cpp.
Definition at line 171 of file SpDCCols.h.
|
inline |
| ccol | Return the ending iterator for the nonzeros of the current column |
Definition at line 184 of file SpDCCols.h.
| void SpDCCols< IT, NT >::EWiseMult | ( | const SpDCCols< IT, NT > & | rhs, |
| bool | exclude | ||
| ) |
Definition at line 308 of file SpDCCols.cpp.
| void SpDCCols< IT, NT >::EWiseScale | ( | NT ** | scaler, |
| IT | m_scaler, | ||
| IT | n_scaler | ||
| ) |
{scaler should NOT contain any zero entries}
Definition at line 348 of file SpDCCols.cpp.
| ifstream & SpDCCols< IT, NT >::get | ( | ifstream & | infile | ) |
Reimplemented from SpMat< IT, NT, SpDCCols< IT, NT > >.
Definition at line 757 of file SpDCCols.cpp.
Reimplemented from SpMat< IT, NT, SpDCCols< IT, NT > >.
Definition at line 459 of file SpDCCols.cpp.
Definition at line 251 of file SpDCCols.h.
Definition at line 256 of file SpDCCols.h.
| vector< IT > SpDCCols< IT, NT >::GetEssentials | ( | ) | const |
Reimplemented from SpMat< IT, NT, SpDCCols< IT, NT > >.
Definition at line 420 of file SpDCCols.cpp.
|
inline |
Reimplemented from SpMat< IT, NT, SpDCCols< IT, NT > >.
Definition at line 229 of file SpDCCols.h.
|
inline |
Reimplemented from SpMat< IT, NT, SpDCCols< IT, NT > >.
Definition at line 230 of file SpDCCols.h.
|
inline |
Reimplemented from SpMat< IT, NT, SpDCCols< IT, NT > >.
Definition at line 228 of file SpDCCols.h.
|
inline |
Definition at line 232 of file SpDCCols.h.
|
inline |
Definition at line 231 of file SpDCCols.h.
|
inline |
Reimplemented from SpMat< IT, NT, SpDCCols< IT, NT > >.
Definition at line 227 of file SpDCCols.h.
| void SpDCCols< IT, NT >::Merge | ( | SpDCCols< IT, NT > & | partA, |
| SpDCCols< IT, NT > & | partB | ||
| ) |
Merges two matrices (cut along the columns) into 1 piece Split method should have been executed on the object beforehand
Definition at line 553 of file SpDCCols.cpp.
| SpDCCols< IT, NT >::operator SpDCCols< IT, NNT > | ( | ) | const |
NNT: New numeric type.
Definition at line 432 of file SpDCCols.cpp.
| SpDCCols< IT, NT >::operator SpDCCols< NIT, NNT > | ( | ) | const |
NNT: New numeric type, NIT: New index type.
Definition at line 446 of file SpDCCols.cpp.
| SpDCCols< IT, NT > SpDCCols< IT, NT >::operator() | ( | IT | ri, |
| IT | ci | ||
| ) | const |
Definition at line 678 of file SpDCCols.cpp.
| SpDCCols< IT, NT > SpDCCols< IT, NT >::operator() | ( | const vector< IT > & | ri, |
| const vector< IT > & | ci | ||
| ) | const |
The almighty indexing polyalgorithm Calls different subroutines depending the sparseness of ri/ci
Reimplemented from SpMat< IT, NT, SpDCCols< IT, NT > >.
Definition at line 712 of file SpDCCols.cpp.
| SpDCCols< IT, NT > & SpDCCols< IT, NT >::operator+= | ( | const SpDCCols< IT, NT > & | rhs | ) |
Definition at line 225 of file SpDCCols.cpp.
| SpDCCols< IT, NT > & SpDCCols< IT, NT >::operator= | ( | const SpDCCols< IT, NT > & | rhs | ) |
The assignment operator operates on an existing object The assignment operator is the only operator that is not inherited. But there is no need to call base's assigment operator as it has no data members
Definition at line 196 of file SpDCCols.cpp.
|
inline |
Definition at line 70 of file SpDCCols.h.
| int SpDCCols< IT, NT >::PlusEq_AnXBn | ( | const SpDCCols< IT, NT > & | A, |
| const SpDCCols< IT, NT > & | B | ||
| ) |
C += A*B (Using ColByCol Algorithm) This version is currently limited to multiplication of matrices with the same precision (e.g. it can't multiply double-precision matrices with booleans) The multiplication is on the specified semiring (passed as parameter)
Definition at line 634 of file SpDCCols.cpp.
| int SpDCCols< IT, NT >::PlusEq_AnXBt | ( | const SpDCCols< IT, NT > & | A, |
| const SpDCCols< IT, NT > & | B | ||
| ) |
C += A*B' (Using OuterProduct Algorithm) This version is currently limited to multiplication of matrices with the same precision (e.g. it can't multiply double-precision matrices with booleans) The multiplication is on the specified semiring (passed as parameter)
Definition at line 590 of file SpDCCols.cpp.
| int SpDCCols< IT, NT >::PlusEq_AtXBn | ( | const SpDCCols< IT, NT > & | A, |
| const SpDCCols< IT, NT > & | B | ||
| ) |
Definition at line 662 of file SpDCCols.cpp.
| int SpDCCols< IT, NT >::PlusEq_AtXBt | ( | const SpDCCols< IT, NT > & | A, |
| const SpDCCols< IT, NT > & | B | ||
| ) |
Definition at line 670 of file SpDCCols.cpp.
| void SpDCCols< IT, NT >::PrintInfo | ( | ) | const |
Definition at line 797 of file SpDCCols.cpp.
| void SpDCCols< IT, NT >::PrintInfo | ( | ofstream & | out | ) | const |
Definition at line 773 of file SpDCCols.cpp.
| SpDCCols< IT, NT > * SpDCCols< IT, NT >::Prune | ( | _UnaryOperation | __unary_op, |
| bool | inPlace | ||
| ) |
Definition at line 262 of file SpDCCols.cpp.
| ofstream & SpDCCols< IT, NT >::put | ( | ofstream & | outfile | ) | const |
Reimplemented from SpMat< IT, NT, SpDCCols< IT, NT > >.
Definition at line 743 of file SpDCCols.cpp.
|
inline |
Definition at line 212 of file SpDCCols.h.
| void SpDCCols< IT, NT >::Split | ( | SpDCCols< IT, NT > & | partA, |
| SpDCCols< IT, NT > & | partB | ||
| ) |
Splits the matrix into two parts, simply by cutting along the columns Simple algorithm that doesn't intend to split perfectly, but it should do a pretty good job Practically destructs the calling object also (frees most of its memory)
Definition at line 524 of file SpDCCols.cpp.
| void SpDCCols< IT, NT >::Transpose | ( | ) |
Mutator version, replaces the calling object.
O(nnz log(nnz)) time Transpose function
Reimplemented from SpMat< IT, NT, SpDCCols< IT, NT > >.
Definition at line 487 of file SpDCCols.cpp.
Const version, doesn't touch the existing object.
O(nnz log(nnz)) time Transpose function
Definition at line 510 of file SpDCCols.cpp.
|
inline |
Definition at line 200 of file SpDCCols.h.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Definition at line 287 of file SpDCCols.h.
Definition at line 293 of file SpDCCols.h.
|
friend |
Definition at line 290 of file SpDCCols.h.
Definition at line 276 of file SpDCCols.h.
Definition at line 277 of file SpDCCols.h.
|
static |
Definition at line 225 of file SpDCCols.h.
1.8.1.1