petsc-3.4.5 2014-06-29

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,PetscInt nreds,PetscThreadCommReduction *redout)

Input Parameters

comm - the MPI comm
op - the reduction operation
type - the data type for reduction
nreds - Number of reductions

Output Parameters

redout -the reduction context

Notes

See include/petscthreadcomm.h for the available reduction operations

To be called from the main thread before calling PetscThreadCommRunKernel

See Also

PetscThreadCommReductionKernelPost(), PetscThreadCommReductionKernelEnd(), PetscThreadCommReductionEnd()

Level:developer
Location:
src/sys/threadcomm/interface/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