COMBINATORIAL_BLAS  1.6
BFSFriends.h File Reference
#include "mpi.h"
#include <iostream>
#include "SpParMat.h"
#include "SpParHelper.h"
#include "MPIType.h"
#include "Friends.h"
#include "OptBuf.h"
#include "ParFriends.h"
#include "BitMap.h"
#include "BitMapCarousel.h"
#include "BitMapFringe.h"

Go to the source code of this file.

Classes

class  SpParMat< IT, NT, DER >
 

Functions

template<typename IT , typename VT >
void dcsc_gespmv_threaded_setbuffers (const SpDCCols< IT, bool > &A, const int32_t *indx, const VT *numx, int32_t nnzx, int32_t *sendindbuf, VT *sendnumbuf, int *cnts, int *dspls, int p_c)
 
template<typename VT , typename IT , typename UDER >
void LocalSpMV (const SpParMat< IT, bool, UDER > &A, int rowneighs, OptBuf< int32_t, VT > &optbuf, int32_t *&indacc, VT *&numacc, int *sendcnt, int accnz)
 
template<typename IU , typename VT >
void MergeContributions (FullyDistSpVec< IU, VT > &y, int *&recvcnt, int *&rdispls, int32_t *&recvindbuf, VT *&recvnumbuf, int rowneighs)
 
template<typename VT , typename IT , typename UDER >
FullyDistSpVec< IT, VT > SpMV (const SpParMat< IT, bool, UDER > &A, const FullyDistSpVec< IT, VT > &x, OptBuf< int32_t, VT > &optbuf)
 
template<typename VT , typename IT , typename UDER >
SpDCCols< int, bool >::SpColIter * CalcSubStarts (SpParMat< IT, bool, UDER > &A, FullyDistSpVec< IT, VT > &x, BitMapCarousel< IT, VT > &done)
 
template<typename VT , typename IT >
void UpdateParents (MPI_Comm &RowWorld, pair< IT, IT > *updates, int num_updates, FullyDistVec< IT, VT > &parents, int source, int dest, BitMapFringe< int64_t, int64_t > &bm_fringe)
 
template<typename VT , typename IT , typename UDER >
void BottomUpStep (SpParMat< IT, bool, UDER > &A, FullyDistSpVec< IT, VT > &x, BitMapFringe< int64_t, int64_t > &bm_fringe, FullyDistVec< IT, VT > &parents, BitMapCarousel< IT, VT > &done, SpDCCols< int, bool >::SpColIter *starts)
 

Function Documentation

◆ BottomUpStep()

template<typename VT , typename IT , typename UDER >
void BottomUpStep ( SpParMat< IT, bool, UDER > &  A,
FullyDistSpVec< IT, VT > &  x,
BitMapFringe< int64_t, int64_t > &  bm_fringe,
FullyDistVec< IT, VT > &  parents,
BitMapCarousel< IT, VT > &  done,
SpDCCols< int, bool >::SpColIter *  starts 
)

Definition at line 457 of file BFSFriends.h.

◆ CalcSubStarts()

template<typename VT , typename IT , typename UDER >
SpDCCols<int,bool>::SpColIter* CalcSubStarts ( SpParMat< IT, bool, UDER > &  A,
FullyDistSpVec< IT, VT > &  x,
BitMapCarousel< IT, VT > &  done 
)

Definition at line 396 of file BFSFriends.h.

◆ dcsc_gespmv_threaded_setbuffers()

template<typename IT , typename VT >
void dcsc_gespmv_threaded_setbuffers ( const SpDCCols< IT, bool > &  A,
const int32_t *  indx,
const VT *  numx,
int32_t  nnzx,
int32_t *  sendindbuf,
VT *  sendnumbuf,
int *  cnts,
int *  dspls,
int  p_c 
)

Multithreaded SpMV with sparse vector and preset buffers the assembly of outgoing buffers sendindbuf/sendnumbuf are done here

Definition at line 58 of file BFSFriends.h.

◆ LocalSpMV()

template<typename VT , typename IT , typename UDER >
void LocalSpMV ( const SpParMat< IT, bool, UDER > &  A,
int  rowneighs,
OptBuf< int32_t, VT > &  optbuf,
int32_t *&  indacc,
VT *&  numacc,
int *  sendcnt,
int  accnz 
)

Step 3 of the sparse SpMV algorithm, without the semiring (BFS only)

Parameters
[in,out]optbuf{scratch space for all-to-all (fold) communication}
[in,out]indacc,numacc{index and values of the input vector, deleted upon exit}
[in,out]sendindbuf,sendnumbuf{index and values of the output vector, created}

Definition at line 183 of file BFSFriends.h.

◆ MergeContributions()

template<typename IU , typename VT >
void MergeContributions ( FullyDistSpVec< IU, VT > &  y,
int *&  recvcnt,
int *&  rdispls,
int32_t *&  recvindbuf,
VT *&  recvnumbuf,
int  rowneighs 
)

Definition at line 223 of file BFSFriends.h.

◆ SpMV()

template<typename VT , typename IT , typename UDER >
FullyDistSpVec<IT,VT> SpMV ( const SpParMat< IT, bool, UDER > &  A,
const FullyDistSpVec< IT, VT > &  x,
OptBuf< int32_t, VT > &  optbuf 
)

This is essentially a SpMV for BFS because it lacks the semiring. It naturally justs selects columns of A (adjacencies of frontier) and merges with the minimum entry succeeding. SpParMat has to be boolean input and output vectors are of type VT but their indices are IT

Definition at line 327 of file BFSFriends.h.

◆ UpdateParents()

template<typename VT , typename IT >
void UpdateParents ( MPI_Comm &  RowWorld,
pair< IT, IT > *  updates,
int  num_updates,
FullyDistVec< IT, VT > &  parents,
int  source,
int  dest,
BitMapFringe< int64_t, int64_t > &  bm_fringe 
)

Definition at line 435 of file BFSFriends.h.