Date: 2015-10-02T22:06:30+00:00

Actual source code: viennaclmatimpl.h
petsc-3.6.2 2015-10-02
Report Typos and Errors
4: #include <../src/mat/impls/aij/seq/aij.h> /*I "petscmat.h" I*/ 6: /* Pulls in some ViennaCL includes as well as VIENNACL_WITH_OPENCL: */ 7: #include <../src/vec/vec/impls/seq/seqviennacl/viennaclvecimpl.h> 9: /* for everything else */ 10: #include "viennacl/compressed_matrix.hpp" 11: #include "viennacl/compressed_compressed_matrix.hpp" 14: typedef viennacl::compressed_matrix<PetscScalar> ViennaCLAIJMatrix; 15: typedef viennacl::compressed_compressed_matrix<PetscScalar> ViennaCLCompressedAIJMatrix; 18: struct Mat_SeqAIJViennaCL { 19: Mat_SeqAIJViennaCL() : tempvec(NULL), mat(NULL), compressed_mat(NULL) {} 20: ViennaCLVector *tempvec; 21: ViennaCLAIJMatrix *mat; /* pointer to the matrix on the GPU */ 22: ViennaCLCompressedAIJMatrix *compressed_mat; /* compressed CSR */ 23: }; 25: PETSC_INTERN PetscErrorCode MatViennaCLCopyToGPU(Mat); 26: PETSC_INTERN PetscErrorCode MatViennaCLCopyFromGPU(Mat, ViennaCLAIJMatrix*); 27: #endif