9 #define DEVICE __device__ 17 template<typename Index>
24 template<typename Index>
26 friend class COO<Index>;
50 template<
typename Index>
60 assert(colInd_.size() == rowInd_.size());
61 return colInd_.size();
73 const Index *
row_ptr() {
return rowPtr_.data(); }
74 const Index *
col_ind() {
return colInd_.data(); }
75 const Index *
row_ind() {
return rowInd_.data(); }
const Index * row_ind()
Definition: coo.hpp:75
uint64_t num_nodes() const
number of unique row/col indices
Definition: coo-impl.hpp:32
HOST DEVICE uint64_t num_rows() const
number of matrix rows
Definition: coo-impl.hpp:23
a read-only view of a COO suitable for passing to a GPU kernel by value.
Definition: coo.hpp:25
COO()
empty CSR
Definition: coo-impl.hpp:19
const Index * row_ptr() const
row offset array
Definition: coo.hpp:39
COOView< Index > view() const
create a COOView for this COO
Definition: coo-impl.hpp:93
Vector< Index > rowInd_
non-zero row indices
Definition: coo.hpp:58
PANGOLIN_BEGIN_NAMESPACE()
std::vector< Edge > EdgeList
Definition: edge_list.hpp:9
const Index * colInd_
non-zero column indices
Definition: coo.hpp:34
A COO matrix backed by CUDA Unified Memory, with a CSR rowPtr.
Definition: coo.hpp:18
const Index * row_ptr()
row offset array
Definition: coo.hpp:73
Vector< Index > rowPtr_
offset in col_ that each row starts at
Definition: coo.hpp:56
Vector< Index > colInd_
non-zero column indices
Definition: coo.hpp:57
uint64_t nnz_
number of non-zeros
Definition: coo.hpp:28
#define HOST
Definition: coo.hpp:11
const Index * col_ind()
column index array
Definition: coo.hpp:74
HOST DEVICE uint64_t num_rows() const
Definition: coo.hpp:37
const Index * rowInd_
non-zero row indices
Definition: coo.hpp:33
static COO< Index > from_edgelist(const EdgeList &es, bool(*edgeFilter)(const Edge &)=nullptr)
Definition: coo-impl.hpp:50
const Index * row_ind() const
Definition: coo.hpp:41
uint64_t num_rows_
length of rowOffset - 1
Definition: coo.hpp:29
const Index * rowPtr_
offset in col_ that each row starts at
Definition: coo.hpp:32
#define DEVICE
Definition: coo.hpp:12
#define PANGOLIN_END_NAMESPACE()
HOST DEVICE uint64_t nnz() const
number of non-zeros
Definition: coo.hpp:59
HOST DEVICE uint64_t nnz() const
Definition: coo.hpp:36
const Index * col_ind() const
column index array
Definition: coo.hpp:40
std::pair< Uint, Uint > Edge
Definition: edge.hpp:14
Index maxCol_
Definition: coo.hpp:53