petsc-3.4.2 2013-07-02

# PetscThreadCommRunKernel0

PetscThreadCommRunKernel version for kernels with no input arguments

### Synopsis

    #include "petscthreadcomm.h"
    PetscErrorCode PetscThreadCommRunKernel0(MPI_Comm comm,PetscErrorCode (*func)(PetscInt,...))

### Input Parameters

| comm | - the MPI communicator
| func | - the kernel (needs to be cast to PetscThreadKernel)

### Notes

All input arguments to the kernel must be passed by reference, Petsc objects are inherrently passed by reference so you don't need to additionally & them.

Example usage - PetscThreadCommRunKernel0(comm,(PetscThreadKernel)kernel_func); with kernel_func declared as PetscErrorCode kernel_func(PetscInt thread_id)

The first input argument of kernel_func, thread_id, is the thread rank. This is passed implicitly by PETSc.

### See Also

PetscThreadCommCreate(), PetscThreadCommGNThreads()

Level:developer
Location:src/sys/threadcomm/interface/threadcomm.c
Index of all PetscThreadComm routines
Table of Contents for all manual pages
Index of all manual pages