54 #ifndef vtk_m_worklet_contourtree_augmented_print_vectors_h
55 #define vtk_m_worklet_contourtree_augmented_print_vectors_h
71 namespace contourtree_augmented
78 template <
typename T,
typename StorageType>
82 std::ostream& outStream = std::cout);
87 std::ostream& outStream = std::cout);
92 std::ostream& outStream = std::cout);
93 template <
typename T,
typename StorageType>
98 std::ostream& outStream = std::cout);
101 inline void PrintLabel(std::string label, std::ostream& outStream = std::cout)
104 outStream << std::setw(
PREFIX_WIDTH) << std::left << label;
106 outStream << std::right <<
"|";
113 outStream << std::setw(
PREFIX_WIDTH) << std::setfill(
'-') <<
"";
117 for (
vtkm::Id block = 0; block < howMany; block++)
119 outStream << std::setw(
PRINT_WIDTH) << std::setfill(
'-') <<
"";
122 outStream << std::setfill(
' ') << std::endl;
134 template <
typename T>
144 inline void PrintDataType<vtkm::Id>(
vtkm::Id value, std::ostream& outStream)
158 for (
vtkm::Id entry = 0; entry < howMany; entry++)
163 outStream << std::endl;
170 template <
typename ARRAYTYPE>
172 const ARRAYTYPE& dVec,
174 std::ostream& outStream)
179 nValues = dVec.GetNumberOfValues();
186 auto portal = dVec.ReadPortal();
187 for (
vtkm::Id entry = 0; entry < nValues; entry++)
192 outStream << std::endl;
196 template <
typename T,
typename StorageType>
200 std::ostream& outStream)
213 for (
vtkm::Id entry = 0; entry < nValues; entry++)
218 outStream << std::endl;
223 template <
typename T,
typename StorageType>
228 std::ostream& outStream)
242 for (
vtkm::Id entry = 0; entry < nValues; entry++)
244 PrintDataType(dportal.Get(sortPortal.Get(entry)), outStream);
247 outStream << std::endl;
252 template <
typename T>
256 std::ostream& outStream)
268 for (
vtkm::Id entry = 0; entry < nIndices; entry++)
272 outStream << std::endl;
276 template <
typename T>
282 nArray = iVec.GetNumberOfValues();
288 auto portal = iVec.ReadPortal();
289 for (
vtkm::Id entry = 0; entry < nArray; entry++)
293 outStream << std::endl;
296 template <
typename T,
typename StorageType>
300 std::ostream& outStream = std::cout)
308 for (
vtkm::Id row = 0; entry < portal.GetNumberOfValues(); row++)
310 PrintLabel(label +
"[" + std::to_string(row) +
"]", outStream);
312 for (
vtkm::Id col = 0; col < nColumns; col++, entry++)
316 outStream << std::endl;
319 outStream << std::endl;
328 std::ostream& outStream = std::cout)
336 auto edgePairArrayConstPortal = edgePairArray.
ReadPortal();
340 for (
vtkm::Id superarc = 0; superarc < nIndices; superarc++)
342 PrintIndexType(edgePairArrayConstPortal.Get(superarc).second, outStream);
344 outStream << std::endl;
348 for (
vtkm::Id superarc = 0; superarc < nIndices; superarc++)
350 PrintIndexType(edgePairArrayConstPortal.Get(superarc).first, outStream);
352 outStream << std::endl;
359 std::ostream& outStream = std::cout)
362 auto edgePairArrayConstPortal = edgePairArray.
ReadPortal();
366 << edgePairArrayConstPortal.Get(superarc).first <<
" ";
368 << edgePairArrayConstPortal.Get(superarc).second << std::endl;