petsc-3.3-p7 2013-05-11
VecScatterInitializeForGPU
Initializes a generalized scatter from one vector to another for GPU based computation. Effectively, this function creates all the necessary indexing buffers and work vectors needed to move data only those data points in a vector which need to be communicated across ranks. This is done at the first time this function is called. Thereafter, this function launches a kernel, VecCUSPCopySomeToContiguousBufferGPU_Public, which moves the scattered data into a contiguous buffer on the GPU. Currently, this only used in the context of the parallel SpMV call in MatMult_MPIAIJCUSP (in mpi/mpicusp/mpiaijcusp.cu). This function is executed before the call to MatMult. This enables the memory transfers to be overlapped with the MatMult SpMV kernel call.
Synopsis
#include "petscis.h"
#include "petscvec.h"
PetscErrorCode VecScatterInitializeForGPU(VecScatter inctx,Vec x,ScatterMode mode)
Input Parameters
See Also
VecScatterCreate(), VecScatterEnd()
Level:intermediate
Location:src/vec/vec/utils/veccuspvscatcusp.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages