Template Function Pennylane::LightningGPU::Util::SparseMV_cuSparse(const index_type *, const int64_t, const index_type *, const std::complex<Precision> *, const int64_t, CFP_t *, CFP_t *, DevTypeID, cudaStream_t, cusparseHandle_t)¶
Defined in File LinearAlg.hpp
Function Documentation¶
-
template<class index_type, class Precision, class CFP_t, class DevTypeID = int>
inline void Pennylane::LightningGPU::Util::SparseMV_cuSparse(const index_type *csrOffsets_ptr, const int64_t csrOffsets_size, const index_type *columns_ptr, const std::complex<Precision> *values_ptr, const int64_t numNNZ, 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
index_type – 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_1aa9bb4a10596ae2b3f13b5d0cc1080221
Download Python script
Download Notebook
View on GitHub