COMBINATORIAL_BLAS  1.6
combblas::SpImpl< SR, IT, NUM, IVT, OVT > Struct Template Reference

#include <SpImpl.h>

Static Public Member Functions

static void SpMXSpV (const Dcsc< IT, NUM > &Adcsc, int32_t mA, const int32_t *indx, const IVT *numx, int32_t veclen, std::vector< int32_t > &indy, std::vector< OVT > &numy)
 
static void SpMXSpV (const Dcsc< IT, NUM > &Adcsc, int32_t mA, const int32_t *indx, const IVT *numx, int32_t veclen, int32_t *indy, OVT *numy, int *cnts, int *dspls, int p_c)
 
static void SpMXSpV_ForThreading (const Dcsc< IT, NUM > &Adcsc, int32_t mA, const int32_t *indx, const IVT *numx, int32_t veclen, std::vector< int32_t > &indy, std::vector< OVT > &numy, int32_t offset)
 
static void SpMXSpV_ForThreading (const Dcsc< IT, NUM > &Acsc, int32_t mA, const int32_t *indx, const IVT *numx, int32_t veclen, std::vector< int32_t > &indy, std::vector< OVT > &numy, int32_t offset, std::vector< OVT > &localy, BitMap &isthere, std::vector< uint32_t > &nzinds)
 

Detailed Description

template<class SR, class IT, class NUM, class IVT, class OVT>
struct combblas::SpImpl< SR, IT, NUM, IVT, OVT >

IT: The sparse matrix index type. Sparse vector index type is fixed to be int32_t It is the caller function's (inside ParFriends/Friends) job to convert any different types and ensure correctness. Rationale is efficiency, and the fact that we know for sure that 32-bit LOCAL indices are sufficient for all reasonable concurrencies and data sizes (as of 2011)

Todo:
: As of 2015, this might not be true!!! (ABAB)

Definition at line 47 of file SpImpl.h.

Member Function Documentation

◆ SpMXSpV() [1/2]

template<class SR , class IT , class NUM , class IVT , class OVT >
void combblas::SpImpl< SR, IT, NUM, IVT, OVT >::SpMXSpV ( const Dcsc< IT, NUM > &  Adcsc,
int32_t  mA,
const int32_t *  indx,
const IVT *  numx,
int32_t  veclen,
std::vector< int32_t > &  indy,
std::vector< OVT > &  numy 
)
static

Base template version [full use of the semiring add() and multiply()]

Parameters
[in]indx{ vector that practically keeps column numbers requested from A }

Roughly how the below function works: Let's say our sparse vector has entries at 3, 7 and 9. FillColInds() creates a vector of pairs that contain the start and end indices (into matrix.ir and matrix.numx arrays). pair.first is the start index, pair.second is the end index.

Here's how we merge these adjacencies of 3,7 and 9: We keep a heap of size 3 and push the first entries in adj{3}, adj{7}, adj{9} onto the heap wset. That happens in the first for loop.

Then as we pop from the heap we push the next entry from the previously popped adjacency (i.e. matrix column). The heap ensures the output comes out sorted without using a SPA. that's why indy.back() == wset[hsize-1].key is enough to ensure proper merging.

Definition at line 57 of file SpImpl.cpp.

◆ SpMXSpV() [2/2]

template<class SR , class IT , class NUM , class IVT , class OVT >
static void combblas::SpImpl< SR, IT, NUM, IVT, OVT >::SpMXSpV ( const Dcsc< IT, NUM > &  Adcsc,
int32_t  mA,
const int32_t *  indx,
const IVT *  numx,
int32_t  veclen,
int32_t *  indy,
OVT *  numy,
int *  cnts,
int *  dspls,
int  p_c 
)
inlinestatic

Definition at line 161 of file SpImpl.h.

◆ SpMXSpV_ForThreading() [1/2]

template<class SR , class IT , class NUM , class IVT , class OVT >
static void combblas::SpImpl< SR, IT, NUM, IVT, OVT >::SpMXSpV_ForThreading ( const Dcsc< IT, NUM > &  Adcsc,
int32_t  mA,
const int32_t *  indx,
const IVT *  numx,
int32_t  veclen,
std::vector< int32_t > &  indy,
std::vector< OVT > &  numy,
int32_t  offset 
)
inlinestatic

Definition at line 168 of file SpImpl.h.

◆ SpMXSpV_ForThreading() [2/2]

template<class SR , class IT , class NUM , class IVT , class OVT >
static void combblas::SpImpl< SR, IT, NUM, IVT, OVT >::SpMXSpV_ForThreading ( const Dcsc< IT, NUM > &  Acsc,
int32_t  mA,
const int32_t *  indx,
const IVT *  numx,
int32_t  veclen,
std::vector< int32_t > &  indy,
std::vector< OVT > &  numy,
int32_t  offset,
std::vector< OVT > &  localy,
BitMap isthere,
std::vector< uint32_t > &  nzinds 
)
inlinestatic

Definition at line 173 of file SpImpl.h.


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