30 #ifndef HIPCUB_CUB_DEVICE_DEVICE_SPMV_HPP_ 31 #define HIPCUB_CUB_DEVICE_DEVICE_SPMV_HPP_ 33 #include "../../../config.hpp" 35 #include <cub/device/device_spmv.cuh> 36 #include <cub/iterator/tex_ref_input_iterator.cuh> 38 BEGIN_HIPCUB_NAMESPACE
61 ::cub::TexRefInputIterator<ValueT, 66778899, OffsetT> t_vector_x;
64 template <
typename ValueT>
65 HIPCUB_RUNTIME_FUNCTION
68 size_t& temp_storage_bytes,
77 hipStream_t stream = 0,
78 bool debug_synchronous =
false)
80 ::cub::SpmvParams<ValueT, int> spmv_params;
82 spmv_params.d_row_end_offsets = d_row_offsets + 1;
89 spmv_params.alpha = 1.0;
90 spmv_params.beta = 0.0;
92 (void)debug_synchronous;
94 return static_cast<hipError_t
>(
95 ::cub::DispatchSpmv<ValueT, int>::Dispatch(d_temp_storage,
104 #endif // HIPCUB_CUB_DEVICE_DEVICE_SELECT_HPP_ ValueT alpha
Alpha multiplicand.
Definition: device_spmv.hpp:58
int num_rows
Number of rows of matrix A.
Definition: device_spmv.hpp:55
Definition: device_spmv.hpp:40
int num_cols
Number of columns of matrix A.
Definition: device_spmv.hpp:56
OffsetT * d_column_indices
Pointer to the array of num_nonzeros column-indices of the corresponding nonzero elements of matrix A...
Definition: device_spmv.hpp:52
OffsetT * d_row_end_offsets
Pointer to the array of m offsets demarcating the end of every row in d_column_indices and d_values...
Definition: device_spmv.hpp:51
< Signed integer type for sequence offsets
Definition: device_spmv.hpp:48
ValueT * d_vector_y
Pointer to the array of num_rows values corresponding to the dense output vector y ...
Definition: device_spmv.hpp:54
static HIPCUB_RUNTIME_FUNCTION hipError_t CsrMV(void *d_temp_storage, size_t &temp_storage_bytes, ValueT *d_values, int *d_row_offsets, int *d_column_indices, ValueT *d_vector_x, ValueT *d_vector_y, int num_rows, int num_cols, int num_nonzeros, hipStream_t stream=0, bool debug_synchronous=false)
Definition: device_spmv.hpp:66
int num_nonzeros
Number of nonzero elements of matrix A.
Definition: device_spmv.hpp:57
ValueT * d_vector_x
Pointer to the array of num_cols values corresponding to the dense input vector x ...
Definition: device_spmv.hpp:53
ValueT beta
Beta addend-multiplicand.
Definition: device_spmv.hpp:59
ValueT * d_values
Pointer to the array of num_nonzeros values of the corresponding nonzero elements of matrix A...
Definition: device_spmv.hpp:50