20 #ifndef OPM_OPENCLMATRIX_HEADER_INCLUDED 21 #define OPM_OPENCLMATRIX_HEADER_INCLUDED 25 #include <opm/simulators/linalg/gpubridge/opencl/opencl.hpp> 32 template<
class Scalar>
class Matrix;
33 template<
class Scalar>
class BlockedMatrix;
37 template<
class Scalar>
41 OpenclMatrix(cl::Context *context,
int Nb_,
int Mb_,
int nnzbs_,
unsigned int block_size_)
45 block_size(block_size_)
47 nnzValues = cl::Buffer(*context, CL_MEM_READ_WRITE,
48 sizeof(Scalar) * block_size * block_size * nnzbs);
49 colIndices = cl::Buffer(*context, CL_MEM_READ_WRITE,
sizeof(
int) * nnzbs);
50 rowPointers = cl::Buffer(*context, CL_MEM_READ_WRITE,
sizeof(
int) * (Nb + 1));
53 void upload(cl::CommandQueue* queue, Scalar* vals,
int* cols,
int* rows);
58 cl::Buffer colIndices;
59 cl::Buffer rowPointers;
62 unsigned int block_size;
68 #endif // OPM_OPENCLMATRIX_HEADER_INCLUDED This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45
This struct resembles a csr matrix, only doubles are supported The matrix data is stored in OpenCL Bu...
Definition: OpenclMatrix.hpp:38
This struct resembles a blocked csr matrix, like Dune::BCRSMatrix.
Definition: BlockedMatrix.hpp:28
This struct resembles a csr matrix, only doubles are supported The data is stored in contiguous memor...
Definition: Matrix.hpp:33