petsc-3.5.2 2014-09-08
Report Typos and Errors


PetscThreadCommRunKernel version for kernels with 6 input arguments


#include "petscthreadcomm.h" 
PetscErrorCode PetscThreadCommRunKernel6(MPI_Comm comm,PetscErrorCode (*func)(PetscInt,...),void *in1,void *in2,void *in3,void *in4,void *in5,void *in6)

Input Parameters

comm - the MPI communicator
func - the kernel (needs to be cast to PetscThreadKernel)
in1 - first input argument for the kernel
in2 - second input argument for the kernel
in3 - third input argument for the kernel
in4 - fourth input argument for the kernel
in5 - fifth input argument for the kernel
in6 - sixth input argument for the kernel


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 - PetscThreadCommRunKernel1(comm,(PetscThreadKernel)kernel_func,x); with kernel_func declared as PetscErrorCode kernel_func(PetscInt thread_id,PetscInt* x)

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

See Also

PetscThreadCommCreate(), PetscThreadCommGNThreads()

Index of all PetscThreadComm routines
Table of Contents for all manual pages
Index of all manual pages