Date: 2016-07-24T16:49:29+00:00

Actual source code: vecregall.c
petsc-3.7.3 2016-07-24
Report Typos and Errors

      2: #include <petscvec.h>
      3: #include <petsc/private/vecimpl.h>
      4: PETSC_EXTERN PetscErrorCode VecCreate_Seq(Vec);
      5: PETSC_EXTERN PetscErrorCode VecCreate_MPI(Vec);
      6: PETSC_EXTERN PetscErrorCode VecCreate_Standard(Vec);
      7: PETSC_EXTERN PetscErrorCode VecCreate_Shared(Vec);
      8: #if defined(PETSC_HAVE_CUSP)
      9: PETSC_EXTERN PetscErrorCode VecCreate_SeqCUSP(Vec);
     10: PETSC_EXTERN PetscErrorCode VecCreate_MPICUSP(Vec);
     11: PETSC_EXTERN PetscErrorCode VecCreate_CUSP(Vec);
     12: #elif defined(PETSC_HAVE_VIENNACL)
     13: PETSC_EXTERN PetscErrorCode VecCreate_SeqViennaCL(Vec);
     14: PETSC_EXTERN PetscErrorCode VecCreate_MPIViennaCL(Vec);
     15: PETSC_EXTERN PetscErrorCode VecCreate_ViennaCL(Vec);
     16: #elif defined(PETSC_HAVE_VECCUDA)
     17: PETSC_EXTERN PetscErrorCode VecCreate_SeqCUDA(Vec);
     18: PETSC_EXTERN PetscErrorCode VecCreate_MPICUDA(Vec);
     19: PETSC_EXTERN PetscErrorCode VecCreate_CUDA(Vec);
     20: #endif

     24: /*@C
     25:   VecRegisterAll - Registers all of the vector components in the Vec package.

     27:   Not Collective

     29:   Level: advanced

     31: .keywords: Vec, register, all
     32: .seealso:  VecRegister(), VecRegisterDestroy(), VecRegister()
     33: @*/
     34: PetscErrorCode  VecRegisterAll(void)
     35: {

     39:   if (VecRegisterAllCalled) return(0);
     40:   VecRegisterAllCalled = PETSC_TRUE;

     42:   VecRegister(VECSEQ,        VecCreate_Seq);
     43:   VecRegister(VECMPI,        VecCreate_MPI);
     44:   VecRegister(VECSTANDARD,   VecCreate_Standard);
     45:   VecRegister(VECSHARED,     VecCreate_Shared);
     46: #if defined PETSC_HAVE_CUSP
     47:   VecRegister(VECSEQCUSP,    VecCreate_SeqCUSP);
     48:   VecRegister(VECMPICUSP,    VecCreate_MPICUSP);
     49:   VecRegister(VECCUSP,       VecCreate_CUSP);
     50: #elif defined PETSC_HAVE_VIENNACL
     51:   VecRegister(VECSEQVIENNACL,    VecCreate_SeqViennaCL);
     52:   VecRegister(VECMPIVIENNACL,    VecCreate_MPIViennaCL);
     53:   VecRegister(VECVIENNACL,       VecCreate_ViennaCL);
     54: #elif defined(PETSC_HAVE_VECCUDA)
     55:   VecRegister(VECSEQCUDA,    VecCreate_SeqCUDA);
     56:   VecRegister(VECMPICUDA,    VecCreate_MPICUDA);
     57:   VecRegister(VECCUDA,       VecCreate_CUDA);
     58: #endif
     59:   return(0);
     60: }