GPUSender is a wrapper class for classes which will implement copOwnerToAll This is implemented with the intention of creating communicators with generic GPUSender To hide implementation that will either use GPU aware MPI or not.
More...
#include <GpuSender.hpp>
|
|
| GPUSender (const OwnerOverlapCopyCommunicationType &cpuOwnerOverlapCopy) |
| |
| virtual void | copyOwnerToAll (const X &source, X &dest) const =0 |
| | copyOwnerToAll will copy the data in source to all processes. More...
|
| |
|
virtual void | initIndexSet () const =0 |
| |
| void | project (X &x) const |
| | project will project x to the owned subspace More...
|
| |
| 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. More...
|
| |
| field_type | norm (const X &x) const |
| | norm computes the l^2-norm of x across processes. More...
|
| |
| const ::Dune::Communication< MPI_Comm > & | communicator () const |
| | communicator returns the MPI communicator used by this GPUSender More...
|
| |
|
|
std::once_flag | m_initializedIndices |
| |
|
std::unique_ptr< GpuVector< int > > | m_indicesOwner |
| |
|
std::unique_ptr< GpuVector< int > > | m_indicesCopy |
| |
|
const OwnerOverlapCopyCommunicationType & | m_cpuOwnerOverlapCopy |
| |
template<class field_type, class OwnerOverlapCopyCommunicationType>
class Opm::gpuistl::GPUSender< field_type, OwnerOverlapCopyCommunicationType >
GPUSender is a wrapper class for classes which will implement copOwnerToAll This is implemented with the intention of creating communicators with generic GPUSender To hide implementation that will either use GPU aware MPI or not.
- Template Parameters
-
| field_type | is float or double |
| OwnerOverlapCopyCommunicationType | is typically a Dune::LinearOperator::communication_type |
◆ communicator()
template<class field_type , class OwnerOverlapCopyCommunicationType >
| const ::Dune::Communication<MPI_Comm>& Opm::gpuistl::GPUSender< field_type, OwnerOverlapCopyCommunicationType >::communicator |
( |
| ) |
const |
|
inline |
communicator returns the MPI communicator used by this GPUSender
- Returns
- the MPI communicator
◆ copyOwnerToAll()
template<class field_type , class OwnerOverlapCopyCommunicationType >
| virtual void Opm::gpuistl::GPUSender< field_type, OwnerOverlapCopyCommunicationType >::copyOwnerToAll |
( |
const X & |
source, |
|
|
X & |
dest |
|
) |
| const |
|
pure virtual |
◆ dot()
template<class field_type , class OwnerOverlapCopyCommunicationType >
| void Opm::gpuistl::GPUSender< field_type, OwnerOverlapCopyCommunicationType >::dot |
( |
const X & |
x, |
|
|
const X & |
y, |
|
|
field_type & |
output |
|
) |
| const |
|
inline |
dot will carry out the dot product between x and y on the owned indices, then sum up the result across MPI processes.
- Parameters
-
| [in] | x | First vector in dot product |
| [in] | y | Second vector in dot product |
| [out] | output | result will be stored here |
- Note
- This uses the same interface as its DUNE equivalent.
◆ norm()
template<class field_type , class OwnerOverlapCopyCommunicationType >
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.
◆ project()
template<class field_type , class OwnerOverlapCopyCommunicationType >
project will project x to the owned subspace
For each component i which is not owned, x_i will be set to 0
- Parameters
-
| [in,out] | x | the vector to project |
The documentation for this class was generated from the following file: