#include "petscthreadcomm.h" PetscErrorCode PetscThreadCommGetScalars(MPI_Comm comm,PetscScalar **val1, PetscScalar **val2, PetscScalar **val3)
comm | - the MPI communicator having the thread communicator | |
val1 | - pointer to store the first scalar value | |
val2 | - pointer to store the second scalar value | |
val3 | - pointer to store the third scalar value |
Pass NULL if any pointers are not needed.
Called by the main thread only, not from within kernels
PetscScalar *valptr; PetscThreadCommGetScalars(comm,&valptr,NULL,NULL); *valptr = alpha; (alpha is the scalar you wish to pass in PetscThreadCommRunKernel)
PetscThreadCommRunKernel(comm,(PetscThreadKernel)kernel_func,3,x,y,valptr);
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