mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-19 10:35:42 +00:00
Specialze PrintDataType to correctly print id ArrayHandles
This commit is contained in:
parent
4c7eb4045c
commit
4bcdc66633
@ -128,6 +128,13 @@ inline void PrintSeparatingBar(vtkm::Id howMany, std::ostream& outStream = std::
|
||||
} // PrintSeparatingBar()
|
||||
|
||||
|
||||
// routine to print out a single index
|
||||
inline void PrintIndexType(vtkm::Id index, std::ostream& outStream = std::cout)
|
||||
{ // PrintIndexType
|
||||
outStream << std::setw(PRINT_WIDTH - 6) << MaskedIndex(index) << " " << FlagString(index);
|
||||
} // PrintIndexType
|
||||
|
||||
|
||||
// routine to print out a single value
|
||||
template <typename T>
|
||||
inline void PrintDataType(T value, std::ostream& outStream = std::cout)
|
||||
@ -136,11 +143,13 @@ inline void PrintDataType(T value, std::ostream& outStream = std::cout)
|
||||
} // PrintDataType
|
||||
|
||||
|
||||
// routine to print out a single index
|
||||
inline void PrintIndexType(vtkm::Id index, std::ostream& outStream = std::cout)
|
||||
{ // PrintIndexType
|
||||
outStream << std::setw(PRINT_WIDTH - 6) << MaskedIndex(index) << " " << FlagString(index);
|
||||
} // PrintIndexType
|
||||
// Specialization of PrintDataType for vtkm::Id to use PrintIndexType instead so we can properly
|
||||
// print Id arrays using the PrintArrayHandle function, e.g,. to pint permutted Id arrays.
|
||||
template <>
|
||||
inline void PrintDataType<vtkm::Id>(vtkm::Id value, std::ostream& outStream)
|
||||
{
|
||||
PrintIndexType(value, outStream);
|
||||
}
|
||||
|
||||
|
||||
// header line
|
||||
|
Loading…
Reference in New Issue
Block a user