Actual source code: vecregall.c

      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_PROCESS_SHARED_MEMORY)
      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_CUDA)
     17: PETSC_EXTERN PetscErrorCode VecCreate_SeqCUDA(Vec);
     18: PETSC_EXTERN PetscErrorCode VecCreate_MPICUDA(Vec);
     19: PETSC_EXTERN PetscErrorCode VecCreate_CUDA(Vec);
     20: #endif
     21: #if defined(PETSC_HAVE_KOKKOS_KERNELS)
     22: PETSC_EXTERN PetscErrorCode VecCreate_SeqKokkos(Vec);
     23: PETSC_EXTERN PetscErrorCode VecCreate_MPIKokkos(Vec);
     24: PETSC_EXTERN PetscErrorCode VecCreate_Kokkos(Vec);
     25: #endif
     26: #if defined(PETSC_HAVE_HIP)
     27: PETSC_EXTERN PetscErrorCode VecCreate_SeqHIP(Vec);
     28: PETSC_EXTERN PetscErrorCode VecCreate_MPIHIP(Vec);
     29: PETSC_EXTERN PetscErrorCode VecCreate_HIP(Vec);
     30: #endif

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

     35:   Not Collective

     37:   Level: advanced

     39: .seealso:  VecRegister(), VecRegisterDestroy(), VecRegister()
     40: @*/
     41: PetscErrorCode VecRegisterAll(void)
     42: {

     46:   if (VecRegisterAllCalled) return(0);
     47:   VecRegisterAllCalled = PETSC_TRUE;

     49:   VecRegister(VECSEQ,        VecCreate_Seq);
     50:   VecRegister(VECMPI,        VecCreate_MPI);
     51:   VecRegister(VECSTANDARD,   VecCreate_Standard);
     52:   VecRegister(VECSHARED,     VecCreate_Shared);
     53: #if defined PETSC_HAVE_VIENNACL
     54:   VecRegister(VECSEQVIENNACL,    VecCreate_SeqViennaCL);
     55:   VecRegister(VECMPIVIENNACL,    VecCreate_MPIViennaCL);
     56:   VecRegister(VECVIENNACL,       VecCreate_ViennaCL);
     57: #endif
     58: #if defined(PETSC_HAVE_CUDA)
     59:   VecRegister(VECSEQCUDA,    VecCreate_SeqCUDA);
     60:   VecRegister(VECMPICUDA,    VecCreate_MPICUDA);
     61:   VecRegister(VECCUDA,       VecCreate_CUDA);
     62: #endif
     63: #if defined(PETSC_HAVE_KOKKOS_KERNELS)
     64:   VecRegister(VECSEQKOKKOS,  VecCreate_SeqKokkos);
     65:   VecRegister(VECMPIKOKKOS,  VecCreate_MPIKokkos);
     66:   VecRegister(VECKOKKOS,     VecCreate_Kokkos);
     67: #endif
     68: #if defined(PETSC_HAVE_HIP)
     69:   VecRegister(VECSEQHIP,    VecCreate_SeqHIP);
     70:   VecRegister(VECMPIHIP,    VecCreate_MPIHIP);
     71:   VecRegister(VECHIP,       VecCreate_HIP);
     72: #endif
     73:   return(0);
     74: }