Template Function Pennylane::LightningGPU::Util::SparseMV_cuSparseMPI¶
Defined in File MPILinearAlg.hpp
Function Documentation¶
-
template<class index_type, class Precision, class CFP_t, class DevTypeID = int>
inline void Pennylane::LightningGPU::Util::SparseMV_cuSparseMPI(MPIManager &mpi_manager, const std::size_t &length_local, const index_type *csrOffsets_ptr, const int64_t csrOffsets_size, const index_type *columns_ptr, const std::complex<Precision> *values_ptr, 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
mpi_manager – MPI operation wrapper.
length_local – Length of X.
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.