Actual source code: vecregall.c
petsc-3.10.5 2019-03-28
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_MPI_WIN_CREATE_FEATURE)
      9: PETSC_EXTERN PetscErrorCode VecCreate_Node(Vec);
     10: #endif
     11: #if defined(PETSC_HAVE_VIENNACL)
     12: PETSC_EXTERN PetscErrorCode VecCreate_SeqViennaCL(Vec);
     13: PETSC_EXTERN PetscErrorCode VecCreate_MPIViennaCL(Vec);
     14: PETSC_EXTERN PetscErrorCode VecCreate_ViennaCL(Vec);
     15: #endif
     16: #if 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_MPI_WIN_CREATE_FEATURE
     45:   VecRegister(VECNODE,       VecCreate_Node);
     46: #endif
     47: #if defined PETSC_HAVE_VIENNACL
     48:   VecRegister(VECSEQVIENNACL,    VecCreate_SeqViennaCL);
     49:   VecRegister(VECMPIVIENNACL,    VecCreate_MPIViennaCL);
     50:   VecRegister(VECVIENNACL,       VecCreate_ViennaCL);
     51: #endif
     52: #if 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: }