Actual source code: vecregall.c

petsc-3.8.3 2017-12-09
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

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

 25:   Not Collective

 27:   Level: advanced

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

 37:   if (VecRegisterAllCalled) return(0);
 38:   VecRegisterAllCalled = PETSC_TRUE;

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