#include "petscthreadcomm.h" PetscErrorCode PetscThreadCommRunKernel2(MPI_Comm comm,PetscErrorCode (*func)(PetscInt,...),void *in1,void *in2)
comm | - the MPI communicator | |
func | - the kernel (needs to be cast to PetscThreadKernel) | |
in1 | - 1st input argument for the kernel | |
in2 | - 2nd input argument for the kernel |
Example usage - PetscThreadCommRunKernel1(comm,(PetscThreadKernel)kernel_func,x); with kernel_func declared as PetscErrorCode kernel_func(PetscInt thread_id,PetscInt *x,PetscInt *y)
The first input argument of kernel_func, thread_id, is the thread rank. This is passed implicitly by PETSc.
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