graph
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Functions
elementwise.cuh File Reference
#include "pangolin/namespace.hpp"
#include "search.cuh"
Include dependency graph for elementwise.cuh:
This graph shows which files directly or indirectly include this file:

Functions

template<size_t BLOCK_DIM_X, typename IndexType , typename ValueType >
__device__ void inner_product_inplace_block (const IndexType *indA, ValueType *valA, const IndexType nA, const IndexType *indB, const ValueType *valB, const IndexType nB)
 
template<size_t BLOCK_DIM_X, typename IndexType , typename ValueType >
__global__ void csr_elementwise_inplace (const IndexType *csrRowPtrA, const IndexType *csrColIndA, ValueType *csrValA, const IndexType *csrRowPtrB, const IndexType *csrColIndB, const ValueType *csrValB, const IndexType numRows)
 CSR elementwise matrix multiplication in-place. More...
 
template<typename IndexType , typename ValueType >
__global__ void csr_compress (const IndexType *csrRowPtrA, const IndexType *csrColIndA, const ValueType *csrValA, const IndexType *csrRowPtrB, const IndexType *csrColIndB, const ValueType *csrValB, const IndexType numRows, void *tmp)
 Compress CSR. More...
 

Function Documentation

◆ csr_compress()

template<typename IndexType , typename ValueType >
__global__ void csr_compress ( const IndexType *  csrRowPtrA,
const IndexType *  csrColIndA,
const ValueType *  csrValA,
const IndexType *  csrRowPtrB,
const IndexType *  csrColIndB,
const ValueType *  csrValB,
const IndexType  numRows,
void *  tmp 
)

Compress CSR.

if tmp == nullptr, figures out how much tmp storage to allocate

else, compress the CSR

Parameters
numRowsnumber of rows in A and B

◆ csr_elementwise_inplace()

template<size_t BLOCK_DIM_X, typename IndexType , typename ValueType >
__global__ void csr_elementwise_inplace ( const IndexType *  csrRowPtrA,
const IndexType *  csrColIndA,
ValueType *  csrValA,
const IndexType *  csrRowPtrB,
const IndexType *  csrColIndB,
const ValueType *  csrValB,
const IndexType  numRows 
)

CSR elementwise matrix multiplication in-place.

A = A .* B

may put zeros into A's rows

Parameters
numRowsnumber of rows in A and B

◆ inner_product_inplace_block()

template<size_t BLOCK_DIM_X, typename IndexType , typename ValueType >
__device__ void inner_product_inplace_block ( const IndexType *  indA,
ValueType *  valA,
const IndexType  nA,
const IndexType *  indB,
const ValueType *  valB,
const IndexType  nB 
)

non-zero elements in outer product of two sparse vectors

inner product of sparse A and B in-place in A

may put zeros into A