35 #include <cuda_runtime.h>
36 #include <cusparse_v2.h>
38 #include "SparseMatrix.hpp"
84 CuHyb( std::string file,
double zero = 0 );
95 CuHyb(
const ULI number_of_nonzeros,
const ULI number_of_rows,
const ULI number_of_cols,
double zero );
118 virtual void zxa(
const double *__restrict__ x,
double *__restrict__ z );
126 virtual void zax(
const double *__restrict__ x,
double *__restrict__ z );
137 virtual void zax(
const double *__restrict__ x,
double *__restrict__ z,
const unsigned long int repeat,
const clockid_t clock_id = 0,
double *elapsed_time = NULL );
virtual void zax(const double *__restrict__ x, double *__restrict__ z)
In-place z=Ax function.
Definition: CuHyb.cpp:217
virtual ~CuHyb()
Base deconstructor.
Definition: CuHyb.cpp:62
virtual void getFirstIndexPair(size_t &i, size_t &j)
Definition: CuHyb.cpp:281
CuHyb()
Base constructor.
Definition: CuHyb.cpp:45
virtual unsigned long int m()
Queries the number of rows this matrix contains.
Definition: SparseMatrix.hpp:107
double * GPUz
GPU-local buffer to the output vector.
Definition: CuHyb.hpp:63
size_t j
Top-right column coordinate.
Definition: CuHyb.hpp:72
Wrapper class for the CuSparse HYB data structure for CUDA C.
Definition: CuHyb.hpp:44
Interface common to all sparse matrix storage schemes.
Definition: SparseMatrix.hpp:46
cusparseMatDescr_t descrA
CuSparse matrix descriptor.
Definition: CuHyb.hpp:54
double * GPUx
GPU-local buffer to the input vector.
Definition: CuHyb.hpp:60
static int compareTriplets(const void *left, const void *right)
Sorts 1D columnwise.
Definition: CuHyb.cpp:35
cusparseHybMat_t hybA
GPU-local matrix.
Definition: CuHyb.hpp:57
virtual unsigned long int n()
Queries the number of columns this matrix contains.
Definition: SparseMatrix.hpp:115
A single triplet value.
Definition: Triplet.hpp:52
cusparseHandle_t handle
Handle to CuSparse.
Definition: CuHyb.hpp:51
virtual size_t bytesUsed()
Definition: CuHyb.cpp:272
virtual void zxa(const double *__restrict__ x, double *__restrict__ z)
In-place z=xA function.
Definition: CuHyb.cpp:212
virtual void load(std::vector< Triplet< double > > &input, ULI m, ULI n, double zero)
Definition: CuHyb.cpp:79
size_t i
Top-left row coordinate.
Definition: CuHyb.hpp:69