My Project
|
CUDA compatiable variant of Dune::OwnerOverlapCopyCommunication. More...
#include <CuOwnerOverlapCopy.hpp>
Public Types | |
using | X = CuVector< field_type > |
Public Member Functions | |
CuOwnerOverlapCopy (const OwnerOverlapCopyCommunicationType &cpuOwnerOverlapCopy) | |
void | dot (const X &x, const X &y, field_type &output) const |
dot will carry out the dot product between x and y on the owned indices, then sum up the result across MPI processes. | |
field_type | norm (const X &x) const |
norm computes the l^2-norm of x across processes. | |
void | project (X &x) const |
project will project x to the owned subspace | |
void | copyOwnerToAll (const X &source, X &dest) const |
copyOwnerToAll will copy source to the CPU, then call OwnerOverlapCopyCommunicationType::copyOwnerToAll on the copied data, and copy the result back to the GPU | |
CUDA compatiable variant of Dune::OwnerOverlapCopyCommunication.
This class can essentially be seen as an adapter around Dune::OwnerOverlapCopyCommunication, and should work as a Dune::OwnerOverlapCopyCommunication on CuVectors
field_type | should be a field_type supported by CuVector (double, float) |
block_size | the block size used (this is relevant for say figuring out the correct indices) |
OwnerOverlapCopyCommunicationType | should mimic Dune::OwnerOverlapCopyCommunication. |
|
inline |
copyOwnerToAll will copy source to the CPU, then call OwnerOverlapCopyCommunicationType::copyOwnerToAll on the copied data, and copy the result back to the GPU
[in] | source | |
[out] | dest |
|
inline |
dot will carry out the dot product between x and y on the owned indices, then sum up the result across MPI processes.
[out] | output | result will be stored here |
|
inline |
norm computes the l^2-norm of x across processes.
This will compute the dot product of x with itself on owned indices, then sum the result across process and return the square root of the sum.
|
inline |
project will project x to the owned subspace
For each component i which is not owned, x_i will be set to 0
[in,out] | x | the vector to project |