Template Function Pennylane::LightningGPU::Util::SparseMV_cuSparse(const IndexT *, const int64_t, const IndexT *, const std::complex<Precision> *, const int64_t, const CFP_t *, CFP_t *, DevTypeID, cudaStream_t, cusparseHandle_t)¶
Defined in File LinearAlg.hpp
Function Documentation¶
-
template<class IndexT, class Precision, class CFP_t, class DevTypeID = int>
inline void Pennylane::LightningGPU::Util::SparseMV_cuSparse(const IndexT *csrOffsets_ptr, const int64_t csrOffsets_size, const IndexT *columns_ptr, const std::complex<Precision> *values_ptr, const int64_t numNNZ, const CFP_t *X, CFP_t *Y, DevTypeID device_id, cudaStream_t stream_id, cusparseHandle_t handle)¶ Sparse matrix vector multiply offloaded to cuSparse (Y = alpha*SparseMat*X + beta)
- Template Parameters
IndexT – Integer type for offsets, indices and number of elements (std::size_t for the moment).
Precision – Floating data-type.
DevTypeID – Integer type of device id.
- Parameters
csrOffsets_ptr – Pointer to offsets in CSR format.
csrOffsets_size – Number of elements of offsets.
columns_ptr – Pointer to column indices in CSR format.
values_ptr – Pointer to value of each non-zero elements in CSR format.
numNNZ – Number of non-zero elements.
X – Pointer to vector.
Y – Pointer to vector.
device_id – Device id.
cudaStream_t – Stream id.
handle – cuSparse handle.
api/function_LinearAlg_8hpp_1acd5967cd918605111b4fa95489004906
Download Python script
Download Notebook
View on GitHub