petsc-3.3-p7 2013-05-11

PetscThreadReductionBegin

Initiates a threaded reduction and returns a reduction object to be passed to PetscThreadCommRunKernel

Synopsis

#include "petscthreadcomm.h" 
PetscErrorCode PetscThreadReductionBegin(MPI_Comm comm,PetscThreadCommReductionOp op, PetscDataType type,PetscThreadCommRedCtx *red)

Input Parameters

Notes

See include/petscthreadcomm.h for the available reduction operations

To be called from the main thread before calling PetscThreadCommRunKernel

See Also

PetscThreadCommReductionKernelBegin(), PetscThreadCommReductionKernelEnd(), PetscThreadCommReductionEnd()

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

Examples

src/sys/threadcomm/examples/tutorials/ex3.c.html
comm - the MPI comm
op - the reduction operation
type - the data type for reduction
red - the reduction context