COMBINATORIAL_BLAS  1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Friends
Dcsc< IT, NT > Class Template Reference

#include <dcsc.h>

List of all members.

Public Member Functions

 Dcsc ()
 Dcsc (IT nnz, IT nzcol)
 Dcsc (IT nnz, const vector< IT > &indices, bool isRow)
 Create a logical matrix from (row/column) indices vector.
 Dcsc (StackEntry< NT, pair< IT, IT > > *multstack, IT mdim, IT ndim, IT nnz)
 Dcsc (const Dcsc< IT, NT > &rhs)
Dcsc< IT, NT > & operator= (const Dcsc< IT, NT > &rhs)
Dcsc< IT, NT > & operator+= (const Dcsc< IT, NT > &rhs)
 ~Dcsc ()
bool operator== (const Dcsc< IT, NT > &rhs)
template<typename NNT >
 operator Dcsc< IT, NNT > () const
template<typename NIT , typename NNT >
 operator Dcsc< NIT, NNT > () const
void EWiseMult (const Dcsc< IT, NT > &rhs, bool exclude)
void EWiseScale (NT **scaler)
template<typename _UnaryOperation >
void Apply (_UnaryOperation __unary_op)
template<typename _UnaryOperation >
Dcsc< IT, NT > * Prune (_UnaryOperation __unary_op, bool inPlace)
IT AuxIndex (const IT colind, bool &found, IT *aux, IT csize) const
void RowSplit (int numsplits)
void Split (Dcsc< IT, NT > *&A, Dcsc< IT, NT > *&B, IT cut)
void Merge (const Dcsc< IT, NT > *Adcsc, const Dcsc< IT, NT > *B, IT cut)
IT ConstructAux (IT ndim, IT *&aux) const
void Resize (IT nzcnew, IT nznew)
template<class VT >
void FillColInds (const VT *colnums, IT nind, vector< pair< IT, IT > > &colinds, IT *aux, IT csize) const
Dcsc< IT, NT > & AddAndAssign (StackEntry< NT, pair< IT, IT > > *multstack, IT mdim, IT ndim, IT nnz)
template<typename _BinaryOperation >
void UpdateDense (NT **array, _BinaryOperation __binary_op) const

Public Attributes

IT * cp
 The master array, size nzc+1 (keeps column pointers)
IT * jc
 col indices, size nzc
IT * ir
 row indices, size nz
NT * numx
 generic values, size nz
IT nz
IT nzc
 number of columns with at least one non-zero in them

Friends

template<typename IU , typename NU1 , typename NU2 >
Dcsc< IU, typename
promote_trait< NU1, NU2 >
::T_promote > 
EWiseMult (const Dcsc< IU, NU1 > &A, const Dcsc< IU, NU2 > *B, bool exclude)

Detailed Description

template<class IT, class NT>
class Dcsc< IT, NT >

Definition at line 45 of file dcsc.h.


Constructor & Destructor Documentation

template<class IT , class NT >
Dcsc< IT, NT >::Dcsc ( )

Definition at line 38 of file dcsc.cpp.

template<class IT , class NT >
Dcsc< IT, NT >::Dcsc ( IT  nnz,
IT  nzcol 
)

Definition at line 41 of file dcsc.cpp.

template<class IT , class NT >
Dcsc< IT, NT >::Dcsc ( IT  nnz,
const vector< IT > &  indices,
bool  isRow 
)

Create a logical matrix from (row/column) indices vector.

Create a logical matrix from (row/column) indices array

Remarks:
This function should only be used for indexing
For these temporary matrices nz = nzc (which are both equal to nnz)

Definition at line 236 of file dcsc.cpp.

template<class IT , class NT >
Dcsc< IT, NT >::Dcsc ( StackEntry< NT, pair< IT, IT > > *  multstack,
IT  mdim,
IT  ndim,
IT  nnz 
)

Creates DCSC structure from an array of StackEntry's

Remarks:
Complexity: O(nnz)

Definition at line 193 of file dcsc.cpp.

template<class IT , class NT >
Dcsc< IT, NT >::Dcsc ( const Dcsc< IT, NT > &  rhs)

Definition at line 294 of file dcsc.cpp.

template<class IT , class NT >
Dcsc< IT, NT >::~Dcsc ( )

Definition at line 890 of file dcsc.cpp.


Member Function Documentation

template<class IT , class NT >
Dcsc< IT, NT > & Dcsc< IT, NT >::AddAndAssign ( StackEntry< NT, pair< IT, IT > > *  multstack,
IT  mdim,
IT  ndim,
IT  nnz 
)

Definition at line 69 of file dcsc.cpp.

template<class IT, class NT>
template<typename _UnaryOperation >
void Dcsc< IT, NT >::Apply ( _UnaryOperation  __unary_op)
inline

Definition at line 70 of file dcsc.h.

template<class IT , class NT >
IT Dcsc< IT, NT >::AuxIndex ( const IT  colind,
bool &  found,
IT *  aux,
IT  csize 
) const

The first part of the indexing algorithm described in the IPDPS'08 paper

Parameters:
IT]colind {Column index to search} Find the column with colind. If it exists, return the position of it. It it doesn't exist, return value is undefined (implementation specific).

Definition at line 740 of file dcsc.cpp.

template<class IT , class NT >
IT Dcsc< IT, NT >::ConstructAux ( IT  ndim,
IT *&  aux 
) const

Construct an index array called aux Return the size of the contructed array Complexity O(nzc)

Definition at line 639 of file dcsc.cpp.

template<class IT , class NT >
void Dcsc< IT, NT >::EWiseMult ( const Dcsc< IT, NT > &  rhs,
bool  exclude 
)
Parameters:
[in]excludeif false,
then operation is A = A .* B
else operation is A = A .* not(B)

Definition at line 511 of file dcsc.cpp.

template<class IT , class NT >
void Dcsc< IT, NT >::EWiseScale ( NT **  scaler)

Definition at line 601 of file dcsc.cpp.

template<class IT , class NT >
template<class VT >
void Dcsc< IT, NT >::FillColInds ( const VT *  colnums,
IT  nind,
vector< pair< IT, IT > > &  colinds,
IT *  aux,
IT  csize 
) const

param[in] nind { length(colsums), gives number of columns of A that contributes to C(:,i) } Vector type VT is allowed to be different than matrix type (IT) However, VT should be up-castable to IT (example: VT=int32_t, IT=int64_t)

Definition at line 826 of file dcsc.cpp.

template<class IT , class NT >
void Dcsc< IT, NT >::Merge ( const Dcsc< IT, NT > *  Adcsc,
const Dcsc< IT, NT > *  B,
IT  cut 
)

Definition at line 793 of file dcsc.cpp.

template<class IT , class NT >
template<typename NNT >
Dcsc< IT, NT >::operator Dcsc< IT, NNT > ( ) const

Definition at line 262 of file dcsc.cpp.

template<class IT , class NT >
template<typename NIT , typename NNT >
Dcsc< IT, NT >::operator Dcsc< NIT, NNT > ( ) const

Definition at line 278 of file dcsc.cpp.

template<class IT , class NT >
Dcsc< IT, NT > & Dcsc< IT, NT >::operator+= ( const Dcsc< IT, NT > &  rhs)

Definition at line 372 of file dcsc.cpp.

template<class IT , class NT >
Dcsc< IT, NT > & Dcsc< IT, NT >::operator= ( const Dcsc< IT, NT > &  rhs)

Assignment operator (called on an existing object)

Definition at line 326 of file dcsc.cpp.

template<class IT , class NT >
bool Dcsc< IT, NT >::operator== ( const Dcsc< IT, NT > &  rhs)

Definition at line 470 of file dcsc.cpp.

template<class IT , class NT >
template<typename _UnaryOperation >
Dcsc< IT, NT > * Dcsc< IT, NT >::Prune ( _UnaryOperation  __unary_op,
bool  inPlace 
)

Definition at line 521 of file dcsc.cpp.

template<class IT , class NT >
void Dcsc< IT, NT >::Resize ( IT  nzcnew,
IT  nznew 
)

Resizes cp & jc arrays to nzcnew, ir & numx arrays to nznew Zero overhead in case sizes stay the same

Definition at line 673 of file dcsc.cpp.

template<class IT, class NT>
void Dcsc< IT, NT >::RowSplit ( int  numsplits)
template<class IT , class NT >
void Dcsc< IT, NT >::Split ( Dcsc< IT, NT > *&  A,
Dcsc< IT, NT > *&  B,
IT  cut 
)

Split along the cut (a column index) Should work even when one of the splits have no nonzeros at all

Definition at line 757 of file dcsc.cpp.

template<class IT , class NT >
template<typename _BinaryOperation >
void Dcsc< IT, NT >::UpdateDense ( NT **  array,
_BinaryOperation  __binary_op 
) const

Updates entries of 2D dense array using __binary_op and entries of "this"

Precondition:
{ __binary_op is a commutative operation}

Definition at line 620 of file dcsc.cpp.


Friends And Related Function Documentation

template<class IT, class NT>
template<typename IU , typename NU1 , typename NU2 >
Dcsc<IU, typename promote_trait<NU1,NU2>::T_promote> EWiseMult ( const Dcsc< IU, NU1 > &  A,
const Dcsc< IU, NU2 > *  B,
bool  exclude 
)
friend
Parameters:
[in]excludeif false,
then operation is A = A .* B
else operation is A = A .* not(B)

Definition at line 641 of file Friends.h.


Member Data Documentation

template<class IT, class NT>
IT* Dcsc< IT, NT >::cp

The master array, size nzc+1 (keeps column pointers)

Definition at line 95 of file dcsc.h.

template<class IT, class NT>
IT* Dcsc< IT, NT >::ir

row indices, size nz

Definition at line 97 of file dcsc.h.

template<class IT, class NT>
IT* Dcsc< IT, NT >::jc

col indices, size nzc

Definition at line 96 of file dcsc.h.

template<class IT, class NT>
NT* Dcsc< IT, NT >::numx

generic values, size nz

Definition at line 98 of file dcsc.h.

template<class IT, class NT>
IT Dcsc< IT, NT >::nz

Definition at line 100 of file dcsc.h.

template<class IT, class NT>
IT Dcsc< IT, NT >::nzc

number of columns with at least one non-zero in them

Definition at line 101 of file dcsc.h.


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