Actual source code: petscviennacl.h
petsc-3.12.4 2020-02-04
Report Typos and Errors

      1: #if !defined(PETSCVIENNACL_H)
      2: #define PETSCVIENNACL_H

      4:  #include <petscvec.h>

      6: #if defined(PETSC_HAVE_CUDA)
      7: #define VIENNACL_WITH_CUDA
      8: #endif

     10: #if defined(PETSC_HAVE_OPENCL)
     11: #define VIENNACL_WITH_OPENCL
     12: #endif

     14: #if defined(PETSC_HAVE_OPENMP)
     15: #define VIENNACL_WITH_OPENMP
     16: #endif

     18: #include <viennacl/forwards.h>
     19: #include <viennacl/vector_proxy.hpp>
     20: #include <viennacl/vector.hpp>

     22: PETSC_EXTERN PetscErrorCode VecViennaCLGetArray(Vec v, viennacl::vector<PetscScalar> **a);
     23: PETSC_EXTERN PetscErrorCode VecViennaCLRestoreArray(Vec v, viennacl::vector<PetscScalar> **a);

     25: PETSC_EXTERN PetscErrorCode VecViennaCLGetArrayRead(Vec v, const viennacl::vector<PetscScalar> **a);
     26: PETSC_EXTERN PetscErrorCode VecViennaCLRestoreArrayRead(Vec v, const viennacl::vector<PetscScalar> **a);

     28: PETSC_EXTERN PetscErrorCode VecViennaCLGetArrayWrite(Vec v, viennacl::vector<PetscScalar> **a);
     29: PETSC_EXTERN PetscErrorCode VecViennaCLRestoreArrayWrite(Vec v, viennacl::vector<PetscScalar> **a);

     32: #endif