Go to the documentation of this file.
10 #ifndef vtk_m_cont_UncertainCellSet_h
11 #define vtk_m_cont_UncertainCellSet_h
37 template <
typename CellSetList>
43 "Cannot use vtkm::ListUniversal with UncertainCellSet.");
51 template <
typename CellSetType>
62 template <
typename OtherCellSetList>
80 template <
typename Functor,
typename... Args>
83 this->CastAndCallForTypes<CellSetList>(std::forward<Functor>(functor),
84 std::forward<Args>(args)...);
89 template <
typename NewCellSetList>
95 template <
typename NewCellSetList>
104 template <
typename CellSetList>
107 using DynamicTag = vtkm::cont::internal::DynamicTransformTagCastAndCall;
124 template <
typename CellSetList>
125 struct SerializableTypeString<
vtkm::cont::UncertainCellSet<CellSetList>>
141 struct UncertainCellSetSerializeFunctor
143 template <
typename CellSetType>
144 void operator()(
const CellSetType& cs, BinaryBuffer& bb)
const
147 vtkmdiy::save(bb, cs);
151 struct UncertainCellSetDeserializeFunctor
153 template <
typename CellSetType>
154 void operator()(CellSetType,
156 const std::string& typeString,
158 BinaryBuffer& bb)
const
162 CellSetType knownCellSet;
164 unknownCellSet = knownCellSet;
172 template <
typename CellSetList>
173 struct Serialization<
vtkm::cont::UncertainCellSet<CellSetList>>
178 static VTKM_CONT void save(BinaryBuffer& bb,
const Type& obj)
180 obj.CastAndCall(internal::UncertainCellSetSerializeFunctor{}, bb);
185 std::string typeString;
188 bool success =
false;
190 internal::UncertainCellSetDeserializeFunctor{}, CellSetList{}, obj, typeString, success, bb);
195 "Error deserializing Unknown/UncertainCellSet. Message TypeString: " + typeString);
204 #endif //vtk_m_cont_UncertainCellSet_h
T load(const U &u, vtkm::Id v)
Definition: FetchTagArrayDirectIn.h:36
Groups connected points that have the same field value.
Definition: Atomic.h:19
auto Get(const vtkm::Tuple< Ts... > &tuple)
Retrieve the object from a vtkm::Tuple at the given index.
Definition: Tuple.h:81
UncertainCellSet(const UncertainCellSet< OtherCellSetList > &src)
Definition: UncertainCellSet.h:63
vtkm::cont::UncertainCellSet< CellSetList > ResetCellSetList() const
A CellSet of an uncertain type.
Definition: UncertainCellSet.h:38
void CastAndCall(Functor &&functor, Args &&... args) const
Call a functor using the underlying cell set type.
Definition: UncertainCellSet.h:81
A CellSet of an unknown type.
Definition: UnknownCellSet.h:48
UncertainCellSet(const CellSetType &cellSet)
Definition: UncertainCellSet.h:52
This class is thrown when VTK-m encounters data of a type that is incompatible with the current opera...
Definition: ErrorBadType.h:25
Definition: Particle.h:351
Thisclass NewInstance() const
Create a new cell set of the same type as this.
Definition: UncertainCellSet.h:73
#define VTKM_STATIC_ASSERT_MSG(condition, message)
Definition: StaticAssert.h:18
#define VTKM_CONT
Definition: ExportMacros.h:57
UncertainCellSet(const vtkm::cont::UnknownCellSet &src)
Definition: UncertainCellSet.h:57
void ListForEach(Functor &&f, vtkm::List< Ts... >, Args &&... args)
For each typename represented by the list, call the functor with a default instance of that type.
Definition: List.h:725
#define VTKM_IS_LIST(type)
Checks that the argument is a proper list.
Definition: List.h:69
#define VTKM_ALWAYS_EXPORT
Definition: ExportMacros.h:89