COMBINATORIAL_BLAS  1.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
SpDCCols< IU, NU > Class Template Reference

#include <Friends.h>

Inheritance diagram for SpDCCols< IU, NU >:
SpMat< IT, NT, SpDCCols< IT, NT > >

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 (IT nRow, IT nCol, IT nnz1, const tuple< IT, IT, NT > *rhs, bool transpose)
 
 SpDCCols (const SpDCCols< IT, NT > &rhs)
 
 ~SpDCCols ()
 
template<typename NNT >
 operator SpDCCols< IT, NNT > () const
 NNT: New numeric type. More...
 
template<typename NIT , typename NNT >
 operator SpDCCols< NIT, NNT > () const
 NNT: New numeric type, NIT: New index type. More...
 
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 , typename GlobalIT >
SpDCCols< IT, NT > * PruneI (_UnaryOperation __unary_op, bool inPlace, GlobalIT rowOffset, GlobalIT colOffset)
 
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. More...
 
SpDCCols< IT, NT > TransposeConst () const
 Const version, doesn't touch the existing object. More...
 
SpDCCols< IT, NT > * TransposeConstPtr () const
 
void RowSplit (int numsplits)
 
void ColSplit (int parts, vector< SpDCCols< IT, NT > > &matrices)
 
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)
 
void CreateImpl (IT *_cp, IT *_jc, IT *_ir, NT *_numx, IT _nz, IT _nzc, IT _m, IT _n)
 
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
 
auto GetInternal () const
 
auto GetInternal (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)
 
SpMat< IT, NT, SpDCCols< IT, NT > > operator() (const vector< IT > &ri, const vector< IT > &ci) const
 
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)
 
Arr< IT, NT > GetArrays () const
 
vector< IT > GetEssentials () const
 
auto GetInternal () const
 
auto GetInternal (int i) const
 
int getnsplit () const
 
void Transpose ()
 
bool operator== (const SpMat< IT, NT, SpDCCols< IT, NT > > &rhs) const
 
ofstream & put (ofstream &outfile) const
 
ifstream & get (ifstream &infile)
 
bool isZero () const
 
IT getnrow () const
 
IT getncol () const
 
IT getnnz () const
 

Static Public Attributes

static const IT esscount
 

Friends

template<class IU , class NU >
class SpDCCols
 
template<class IU , class NU >
class SpTuples
 
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. More...
 
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)
 

Detailed Description

template<class IU, class NU>
class SpDCCols< IU, NU >

Definition at line 49 of file Friends.h.

Member Typedef Documentation

template<class IU, class NU>
typedef IT SpDCCols< IU, NU >::LocalIT

Definition at line 52 of file SpDCCols.h.

template<class IU, class NU>
typedef NT SpDCCols< IU, NU >::LocalNT

Definition at line 53 of file SpDCCols.h.

Constructor & Destructor Documentation

template<class IU, class NU>
SpDCCols< IU, NU >::SpDCCols ( )
template<class IU, class NU>
SpDCCols< IU, NU >::SpDCCols ( IT  size,
IT  nRow,
IT  nCol,
IT  nzc 
)
template<class IU, class NU>
SpDCCols< IU, NU >::SpDCCols ( const SpTuples< IT, NT > &  rhs,
bool  transpose 
)
template<class IU, class NU>
SpDCCols< IU, NU >::SpDCCols ( IT  nRow,
IT  nCol,
IT  nnz1,
const tuple< IT, IT, NT > *  rhs,
bool  transpose 
)
template<class IU, class NU>
SpDCCols< IU, NU >::SpDCCols ( const SpDCCols< IT, NT > &  rhs)
template<class IU, class NU>
SpDCCols< IU, NU >::~SpDCCols ( )

Member Function Documentation

template<class IU, class NU>
template<typename _UnaryOperation >
void SpDCCols< IU, NU >::Apply ( _UnaryOperation  __unary_op)
inline

Definition at line 192 of file SpDCCols.h.

template<class IU, class NU>
SpColIter SpDCCols< IU, NU >::begcol ( )
inline

Definition at line 166 of file SpDCCols.h.

template<class IU, class NU>
SpColIter::NzIter SpDCCols< IU, NU >::begnz ( const SpColIter ccol)
inline
Parameters
ccolReturn the beginning iterator for the nonzeros of the current column

Definition at line 181 of file SpDCCols.h.

template<class IU, class NU>
void SpDCCols< IU, NU >::ColSplit ( int  parts,
vector< SpDCCols< IT, NT > > &  matrices 
)
Attention
Destroys calling object (*this)
template<class IU, class NU>
void SpDCCols< IU, NU >::CreateImpl ( const vector< IT > &  essentials)
template<class IU, class NU>
void SpDCCols< IU, NU >::CreateImpl ( IT  size,
IT  nRow,
IT  nCol,
tuple< IT, IT, NT > *  mytuples 
)
template<class IU, class NU>
void SpDCCols< IU, NU >::CreateImpl ( IT *  _cp,
IT *  _jc,
IT *  _ir,
NT *  _numx,
IT  _nz,
IT  _nzc,
IT  _m,
IT  _n 
)
template<class IU, class NU>
SpColIter SpDCCols< IU, NU >::endcol ( )
inline

Definition at line 173 of file SpDCCols.h.

template<class IU, class NU>
SpColIter::NzIter SpDCCols< IU, NU >::endnz ( const SpColIter ccol)
inline
Parameters
ccolReturn the ending iterator for the nonzeros of the current column

Definition at line 186 of file SpDCCols.h.

template<class IU, class NU>
void SpDCCols< IU, NU >::EWiseMult ( const SpDCCols< IT, NT > &  rhs,
bool  exclude 
)
template<class IU, class NU>
void SpDCCols< IU, NU >::EWiseScale ( NT **  scaler,
IT  m_scaler,
IT  n_scaler 
)
template<class IU, class NU>
ifstream& SpDCCols< IU, NU >::get ( ifstream &  infile)
template<class IU, class NU>
Arr<IT,NT> SpDCCols< IU, NU >::GetArrays ( ) const
template<class IU, class NU>
Dcsc<IT, NT>* SpDCCols< IU, NU >::GetDCSC ( ) const
inline

Definition at line 259 of file SpDCCols.h.

template<class IU, class NU>
Dcsc<IT, NT>* SpDCCols< IU, NU >::GetDCSC ( int  i) const
inline

Definition at line 264 of file SpDCCols.h.

template<class IU, class NU>
vector<IT> SpDCCols< IU, NU >::GetEssentials ( ) const
template<class IU, class NU>
auto SpDCCols< IU, NU >::GetInternal ( ) const
inline

Definition at line 269 of file SpDCCols.h.

template<class IU, class NU>
auto SpDCCols< IU, NU >::GetInternal ( int  i) const
inline

Definition at line 270 of file SpDCCols.h.

template<class IU, class NU>
IT SpDCCols< IU, NU >::getncol ( ) const
inline

Definition at line 237 of file SpDCCols.h.

template<class IU, class NU>
IT SpDCCols< IU, NU >::getnnz ( ) const
inline

Definition at line 238 of file SpDCCols.h.

template<class IU, class NU>
IT SpDCCols< IU, NU >::getnrow ( ) const
inline

Definition at line 236 of file SpDCCols.h.

template<class IU, class NU>
int SpDCCols< IU, NU >::getnsplit ( ) const
inline

Definition at line 240 of file SpDCCols.h.

template<class IU, class NU>
IT SpDCCols< IU, NU >::getnzc ( ) const
inline

Definition at line 239 of file SpDCCols.h.

template<class IU, class NU>
bool SpDCCols< IU, NU >::isZero ( ) const
inline

Definition at line 235 of file SpDCCols.h.

template<class IU, class NU>
void SpDCCols< IU, NU >::Merge ( SpDCCols< IT, NT > &  partA,
SpDCCols< IT, NT > &  partB 
)
Attention
Destroys its parameters (partA & partB)
template<class IU, class NU>
template<typename NNT >
SpDCCols< IU, NU >::operator SpDCCols< IT, NNT > ( ) const

NNT: New numeric type.

template<class IU, class NU>
template<typename NIT , typename NNT >
SpDCCols< IU, NU >::operator SpDCCols< NIT, NNT > ( ) const

NNT: New numeric type, NIT: New index type.

template<class IU, class NU>
SpDCCols<IT,NT> SpDCCols< IU, NU >::operator() ( IT  ri,
IT  ci 
) const
template<class IU, class NU>
SpDCCols<IT,NT> SpDCCols< IU, NU >::operator() ( const vector< IT > &  ri,
const vector< IT > &  ci 
) const
template<class IU, class NU>
SpDCCols<IT,NT>& SpDCCols< IU, NU >::operator+= ( const SpDCCols< IT, NT > &  rhs)
template<class IU, class NU>
SpDCCols<IT,NT>& SpDCCols< IU, NU >::operator= ( const SpDCCols< IT, NT > &  rhs)
template<class IU, class NU>
bool SpDCCols< IU, NU >::operator== ( const SpDCCols< IT, NT > &  rhs) const
inline

Definition at line 72 of file SpDCCols.h.

template<class IU, class NU>
template<typename SR >
int SpDCCols< IU, NU >::PlusEq_AnXBn ( const SpDCCols< IT, NT > &  A,
const SpDCCols< IT, NT > &  B 
)
template<class IU, class NU>
template<typename SR >
int SpDCCols< IU, NU >::PlusEq_AnXBt ( const SpDCCols< IT, NT > &  A,
const SpDCCols< IT, NT > &  B 
)
template<class IU, class NU>
template<typename SR >
int SpDCCols< IU, NU >::PlusEq_AtXBn ( const SpDCCols< IT, NT > &  A,
const SpDCCols< IT, NT > &  B 
)
template<class IU, class NU>
template<typename SR >
int SpDCCols< IU, NU >::PlusEq_AtXBt ( const SpDCCols< IT, NT > &  A,
const SpDCCols< IT, NT > &  B 
)
template<class IU, class NU>
void SpDCCols< IU, NU >::PrintInfo ( ) const
template<class IU, class NU>
void SpDCCols< IU, NU >::PrintInfo ( ofstream &  out) const
template<class IU, class NU>
template<typename _UnaryOperation >
SpDCCols<IT,NT>* SpDCCols< IU, NU >::Prune ( _UnaryOperation  __unary_op,
bool  inPlace 
)
template<class IU, class NU>
template<typename _UnaryOperation , typename GlobalIT >
SpDCCols<IT,NT>* SpDCCols< IU, NU >::PruneI ( _UnaryOperation  __unary_op,
bool  inPlace,
GlobalIT  rowOffset,
GlobalIT  colOffset 
)
template<class IU, class NU>
ofstream& SpDCCols< IU, NU >::put ( ofstream &  outfile) const
template<class IU, class NU>
void SpDCCols< IU, NU >::RowSplit ( int  numsplits)
inline

Definition at line 217 of file SpDCCols.h.

template<class IU, class NU>
void SpDCCols< IU, NU >::Split ( SpDCCols< IT, NT > &  partA,
SpDCCols< IT, NT > &  partB 
)
Attention
Destroys calling object (*this)
template<class IU, class NU>
void SpDCCols< IU, NU >::Transpose ( )

Mutator version, replaces the calling object.

template<class IU, class NU>
SpDCCols<IT,NT> SpDCCols< IU, NU >::TransposeConst ( ) const

Const version, doesn't touch the existing object.

template<class IU, class NU>
SpDCCols<IT,NT>* SpDCCols< IU, NU >::TransposeConstPtr ( ) const
template<class IU, class NU>
template<typename _BinaryOperation >
void SpDCCols< IU, NU >::UpdateDense ( NT **  array,
_BinaryOperation  __binary_op 
) const
inline

Definition at line 204 of file SpDCCols.h.

Friends And Related Function Documentation

template<class IU, class NU>
template<typename IU >
void BooleanRowSplit ( SpDCCols< IU, bool > &  A,
int  numsplits 
)
friend

Definition at line 386 of file Friends.h.

template<class IU, class NU>
template<typename SR , typename IU , typename NU , typename RHS , typename LHS >
void dcsc_gespmv ( const SpDCCols< IU, NU > &  A,
const RHS *  x,
LHS *  y 
)
friend

SpMV with dense vector.

Definition at line 61 of file Friends.h.

template<class IU, class NU>
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 
)
friend
template<class IU, class NU>
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 
)
friend

Multithreaded SpMV with sparse vector and preset buffers the assembly of outgoing buffers sendindbuf/sendnumbuf are done here IVT: input vector numerical type OVT: output vector numerical type

Definition at line 219 of file Friends.h.

template<class IU, class NU>
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 
)
friend

Definition at line 907 of file Friends.h.

template<class IU, class NU>
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 
)
friend

Definition at line 1171 of file Friends.h.

template<class IU, class NU>
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 
)
friend

Definition at line 882 of file Friends.h.

template<class IU, class NU>
template<class IU , class NU >
friend class SpDCCols
friend

Definition at line 299 of file SpDCCols.h.

template<class IU, class NU>
template<class IU , class NU >
friend class SpTuples
friend

Definition at line 302 of file SpDCCols.h.

template<class IU, class NU>
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 = false,
bool  clearB = false 
)
friend

SpTuples(A*B) (Using ColByCol Algorithm) Returns the tuples for efficient merging later Support mixed precision multiplication The multiplication is on the specified semiring (passed as parameter)

Definition at line 501 of file Friends.h.

template<class IU, class NU>
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 = false,
bool  clearB = false 
)
friend

SpTuples(A*B') (Using OuterProduct Algorithm) Returns the tuples for efficient merging later Support mixed precision multiplication The multiplication is on the specified semiring (passed as parameter)

Definition at line 458 of file Friends.h.

template<class IU, class NU>
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 = false,
bool  clearB = false 
)
friend

Definition at line 538 of file Friends.h.

template<class IU, class NU>
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 = false,
bool  clearB = false 
)
friend

Definition at line 525 of file Friends.h.

Member Data Documentation

template<class IU, class NU>
Dcsc<IT, NT>* SpDCCols< IU, NU >::dcsc

Definition at line 288 of file SpDCCols.h.

template<class IU, class NU>
Dcsc<IT, NT>** SpDCCols< IU, NU >::dcscarr

Definition at line 289 of file SpDCCols.h.

template<class IU, class NU>
const IT SpDCCols< IU, NU >::esscount
static

Definition at line 233 of file SpDCCols.h.


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