graph
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | List of all members
GPUCSR< Index > Class Template Reference

A CSR matrix backed by CUDA Unified Memory. More...

#include <gpu_csr.hpp>

Collaboration diagram for GPUCSR< Index >:
Collaboration graph
[legend]

Public Member Functions

 GPUCSR ()
 empty CSR More...
 
PANGOLIN_CUDA_MEMBER uint64_t nnz () const
 number of non-zeros More...
 
uint64_t num_nodes () const
 number of unique row/col indices More...
 
PANGOLIN_CUDA_MEMBER uint64_t num_rows () const
 number of matrix rows More...
 
PANGOLIN_CUDA_MEMBER uint64_t max_col () const
 number of matrix columns More...
 
GPUCSRView< Index > view () const
 create a GPUCSRView for this GPUCSR More...
 
const Index * deviceRowPtr ()
 row offset array, valid on device More...
 
const Index * deviceColInd ()
 column index array, valid on device More...
 

Static Public Member Functions

static GPUCSR< Index > from_edgelist (const EdgeList &es, bool(*edgeFilter)(const Edge &)=nullptr)
 

Public Attributes

Vector< Index > rowOffset_
 offset in col_ that each row starts at More...
 
Vector< Index > col_
 non-zero column indices More...
 

Private Attributes

Index maxCol_
 

Detailed Description

template<typename Index>
class GPUCSR< Index >

A CSR matrix backed by CUDA Unified Memory.

Copying to a GPU kernel by value will cause the underling memory to be copied as well. For read-only GPU access, use the view() method to get a lightweight reference to the CSR data.

Constructor & Destructor Documentation

◆ GPUCSR()

template<typename Index >
GPUCSR< Index >::GPUCSR ( )

empty CSR

Member Function Documentation

◆ deviceColInd()

template<typename Index>
const Index* GPUCSR< Index >::deviceColInd ( )
inline

column index array, valid on device

◆ deviceRowPtr()

template<typename Index>
const Index* GPUCSR< Index >::deviceRowPtr ( )
inline

row offset array, valid on device

◆ from_edgelist()

template<typename Index >
GPUCSR< Index > GPUCSR< Index >::from_edgelist ( const EdgeList es,
bool(*)(const Edge &)  edgeFilter = nullptr 
)
static

Build a GPUCSR from an EdgeList

Do not include edges where edgeFilter(edge) returns true

◆ max_col()

template<typename Index>
PANGOLIN_CUDA_MEMBER uint64_t GPUCSR< Index >::max_col ( ) const
inline

number of matrix columns

◆ nnz()

template<typename Index>
PANGOLIN_CUDA_MEMBER uint64_t GPUCSR< Index >::nnz ( ) const
inline

number of non-zeros

◆ num_nodes()

template<typename Index >
uint64_t GPUCSR< Index >::num_nodes ( ) const

number of unique row/col indices

◆ num_rows()

template<typename Index >
PANGOLIN_CUDA_MEMBER uint64_t GPUCSR< Index >::num_rows ( ) const

number of matrix rows

◆ view()

template<typename Index >
GPUCSRView< Index > GPUCSR< Index >::view ( ) const

create a GPUCSRView for this GPUCSR

Member Data Documentation

◆ col_

template<typename Index>
Vector<Index> GPUCSR< Index >::col_

non-zero column indices

◆ maxCol_

template<typename Index>
Index GPUCSR< Index >::maxCol_
private

◆ rowOffset_

template<typename Index>
Vector<Index> GPUCSR< Index >::rowOffset_

offset in col_ that each row starts at


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