cleanup
This commit is contained in:
@@ -1004,23 +1004,6 @@ void DeviceSharedDofCommunicator::Bcast<real_t>(Array<real_t> &x_ldof) const
|
||||
Bcast(true_buf, x_ldof);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void DeviceSharedDofCommunicator::ReduceAndBcast(Array<T> &x_ldof, Op op) const
|
||||
{
|
||||
Array<T> x_tdof(nbr_comm->LocalTDofToLDof().Size());
|
||||
x_tdof.GetMemory().UseDevice(true);
|
||||
Reduce(x_ldof, x_tdof, op);
|
||||
Bcast(x_tdof, x_ldof);
|
||||
}
|
||||
|
||||
template <>
|
||||
void DeviceSharedDofCommunicator::ReduceAndBcast<real_t>(Array<real_t> &x_ldof,
|
||||
Op op) const
|
||||
{
|
||||
Reduce(x_ldof, true_buf, op);
|
||||
Bcast(true_buf, x_ldof);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void GroupCommunicator::Bcast(T *ldata) const
|
||||
{
|
||||
@@ -1862,8 +1845,6 @@ template void DeviceSharedDofCommunicator::Bcast<int>(
|
||||
const Array<int> &, Array<int> &) const;
|
||||
template void DeviceSharedDofCommunicator::Bcast<int>(
|
||||
Array<int> &) const;
|
||||
template void DeviceSharedDofCommunicator::ReduceAndBcast<int>(
|
||||
Array<int> &, Op) const;
|
||||
|
||||
template void DeviceSharedDofCommunicator::ReduceBeginCopy<real_t>(
|
||||
const Array<real_t> &, Array<real_t> &) const;
|
||||
|
||||
+10
-12
@@ -595,7 +595,16 @@ class DeviceSharedDofCommunicator
|
||||
public:
|
||||
enum class Op { Sum, Min, Max };
|
||||
|
||||
protected:
|
||||
explicit DeviceSharedDofCommunicator(const GroupCommunicator &gc);
|
||||
~DeviceSharedDofCommunicator();
|
||||
|
||||
template <typename T>
|
||||
void Reduce(Array<T> &x_ldof, Op op) const;
|
||||
|
||||
template <typename T>
|
||||
void Bcast(Array<T> &x_ldof) const;
|
||||
|
||||
private:
|
||||
mutable Array<real_t> shr_buf, ext_buf, true_buf;
|
||||
internal::DeviceNeighborDofComm *nbr_comm;
|
||||
|
||||
@@ -614,22 +623,11 @@ protected:
|
||||
template <typename T>
|
||||
void BcastEndCopy(const Array<T> &ext_buf_t, Array<T> &x_ldof) const;
|
||||
|
||||
public:
|
||||
explicit DeviceSharedDofCommunicator(const GroupCommunicator &gc);
|
||||
~DeviceSharedDofCommunicator();
|
||||
|
||||
template <typename T>
|
||||
void Reduce(const Array<T> &x_ldof, Array<T> &x_tdof, Op op) const;
|
||||
template <typename T>
|
||||
void Reduce(Array<T> &x_ldof, Op op) const;
|
||||
|
||||
template <typename T>
|
||||
void Bcast(const Array<T> &x_tdof, Array<T> &x_ldof) const;
|
||||
template <typename T>
|
||||
void Bcast(Array<T> &x_ldof) const;
|
||||
|
||||
template <typename T>
|
||||
void ReduceAndBcast(Array<T> &x_ldof, Op op) const;
|
||||
};
|
||||
|
||||
/// General MPI message tags used by MFEM
|
||||
|
||||
Reference in New Issue
Block a user