Break circular dependency of ArrayCopy.h and UnknownArrayHandle.h

The circular dependency came from UnknownArrayHandle.h needing
VTKmDefaultTypes.h, which needed all the cell set types. Some of those
cell sets used ArrayCopy in templated functions. Changed those functions
to directly deep copy the ArrayHandle.
This commit is contained in:
Kenneth Moreland 2021-01-14 14:29:47 -07:00
parent 990cc9ecea
commit 26ea2ab420
9 changed files with 12 additions and 15 deletions

@ -15,6 +15,7 @@
/// Reference: Computational Physics 2nd Edition, Nicholas Giordano & Hisao Nakanishi
#include <iomanip>
#include <vtkm/cont/ArrayCopy.h>
#include <vtkm/cont/ArrayHandleRandomUniformReal.h>
#include <vtkm/cont/DataSet.h>
#include <vtkm/cont/DataSetBuilderUniform.h>

@ -15,6 +15,7 @@
#include <vtkm/cont/DeviceAdapterTag.h>
#include <vtkm/cont/ErrorExecution.h>
#include <vtkm/cont/Logging.h>
#include <vtkm/cont/VariantArrayHandle.h>
#include <vtkm/cont/internal/ArrayHandleDeprecated.h>
@ -159,16 +160,6 @@ VTKM_CONT void ArrayCopy(const vtkm::cont::ArrayHandle<InValueType, InStorage>&
detail::ArrayCopyImpl(source, destination, std::integral_constant<bool, !IsOldStyle::value>{});
}
// Forward declaration
// Cannot include UncertainArrayHandle.h here due to circular dependency.
template <typename ValueList, typename StorageList>
class UncertainArrayHandle;
// Forward declaration
// Cannot include VariantArrayHandle.h here due to circular dependency.
template <typename TypeList>
class VariantArrayHandleBase;
namespace detail
{

@ -12,7 +12,7 @@
#include <vtkm/Deprecated.h>
#include <vtkm/cont/CellSetExplicit.h>
#include <vtkm/cont/ArrayCopy.h>
#include <vtkm/cont/Algorithm.h>
#include <vtkm/cont/ArrayGetValues.h>
#include <vtkm/cont/ArrayHandleDecorator.h>
#include <vtkm/cont/Logging.h>
@ -479,9 +479,9 @@ void CellSetExplicit<SST, CST, OST>::DeepCopy(const CellSet* src)
const auto ct = vtkm::TopologyElementTagCell{};
const auto pt = vtkm::TopologyElementTagPoint{};
vtkm::cont::ArrayCopy(other->GetShapesArray(ct, pt), shapes);
vtkm::cont::ArrayCopy(other->GetConnectivityArray(ct, pt), conn);
vtkm::cont::ArrayCopy(other->GetOffsetsArray(ct, pt), offsets);
shapes.DeepCopyFrom(other->GetShapesArray(ct, pt));
conn.DeepCopyFrom(other->GetConnectivityArray(ct, pt));
offsets.DeepCopyFrom(other->GetOffsetsArray(ct, pt));
this->Fill(other->GetNumberOfPoints(), shapes, conn, offsets);
}

@ -11,7 +11,6 @@
#define vtk_m_cont_CellSetExtrude_h
#include <vtkm/TopologyElementTag.h>
#include <vtkm/cont/ArrayCopy.h>
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/ArrayHandleCounting.h>
#include <vtkm/cont/ArrayHandleExtrudeCoords.h>

@ -11,6 +11,7 @@
#define vtk_m_cont_testing_TestingFancyArrayHandles_h
#include <vtkm/VecTraits.h>
#include <vtkm/cont/ArrayCopy.h>
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/ArrayHandleCast.h>
#include <vtkm/cont/ArrayHandleCompositeVector.h>

@ -7,6 +7,7 @@
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//============================================================================
#include <vtkm/cont/ArrayCopy.h>
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/ArrayHandleCartesianProduct.h>
#include <vtkm/cont/ArrayHandleCast.h>

@ -12,6 +12,7 @@
#define vtk_m_filter_particle_density_ngp_hxx
#include "ParticleDensityNearestGridPoint.h"
#include <vtkm/cont/ArrayCopy.h>
#include <vtkm/cont/CellLocatorUniformGrid.h>
#include <vtkm/cont/DataSetBuilderUniform.h>
#include <vtkm/filter/PolicyBase.h>

@ -10,6 +10,8 @@
#include <vtkm/io/VTKRectilinearGridReader.h>
#include <vtkm/cont/ArrayCopy.h>
namespace vtkm
{
namespace io

@ -8,6 +8,7 @@
// PURPOSE. See the above copyright notice for more information.
//============================================================================
#include <vtkm/cont/ArrayCopy.h>
#include <vtkm/cont/ArrayHandleCounting.h>
#include <vtkm/cont/testing/Testing.h>