My code currently uses ModernGPU 1.1 to perform a “unary” SpMV using SpmvCsrUnary(). The vector elements are structs of unsigned uint64’s and the “+” operator is a struct-wide bitwise XOR. All non-zero matrix values are 1’s so we don’t use the CSR values array, only the row_offsets and column_indices arrays.
We would like to move to a more recently updated library optimized for better performance on newer GPUs. To this end, does CUB’s DeviceSpmv() support only primitive data types or can it use a derived data type for the vectors with an overloaded “+” operator?
Can it be easily modified to support a “unary” SpMV, perhaps by setting and detecting a null pointer for the values array?