2: #include <petsc-private/threadcommimpl.h> /*I "petscthreadcomm.h" I*/ 4: PETSC_EXTERN PetscErrorCode PetscThreadCommCreate_NoThread(PetscThreadComm); 5: #if defined(PETSC_HAVE_PTHREADCLASSES) 6: PETSC_EXTERN PetscErrorCode PetscThreadCommCreate_PThread(PetscThreadComm); 7: #endif 8: #if defined(PETSC_HAVE_OPENMP) 9: PETSC_EXTERN PetscErrorCode PetscThreadCommCreate_OpenMP(PetscThreadComm); 10: #endif 12: extern PetscBool PetscThreadCommRegisterAllCalled; 16: /*@C 17: PetscThreadCommRegisterAll - Registers of all the thread communicator models 19: Not Collective 21: Level: advanced 23: .keywords: PetscThreadComm, register, all 25: .seealso: PetscThreadCommRegisterDestroy() 26: @*/ 27: PetscErrorCode PetscThreadCommRegisterAll(void) 28: { 32: PetscThreadCommRegisterAllCalled = PETSC_TRUE; 34: PetscThreadCommRegister(NOTHREAD,PetscThreadCommCreate_NoThread); 35: #if defined(PETSC_HAVE_PTHREADCLASSES) 36: PetscThreadCommRegister(PTHREAD, PetscThreadCommCreate_PThread); 37: #endif 38: #if defined(PETSC_HAVE_OPENMP) 39: PetscThreadCommRegister(OPENMP, PetscThreadCommCreate_OpenMP); 40: #endif 41: return(0); 42: }