MCPcopy Create free account
hub / github.com/Kitware/VTK / ReadFloatArray

Method ReadFloatArray

IO/EnSight/vtkEnSight6BinaryReader.cxx:2826–2849  ·  view source on GitHub ↗

Internal function to read a float array. Returns zero if there was an error.

Source from the content-addressed store, hash-verified

2824// Internal function to read a float array.
2825// Returns zero if there was an error.
2826int vtkEnSight6BinaryReader::ReadFloatArray(float* result, int numFloats)
2827{
2828 if (numFloats <= 0)
2829 {
2830 return 1;
2831 }
2832
2833 if (!this->BinaryIFile->read((char*)result, sizeof(float) * numFloats))
2834 {
2835 vtkErrorMacro("Read failed.");
2836 return 0;
2837 }
2838
2839 if (this->ByteOrder == FILE_LITTLE_ENDIAN)
2840 {
2841 vtkByteSwap::Swap4LERange(result, numFloats);
2842 }
2843 else
2844 {
2845 vtkByteSwap::Swap4BERange(result, numFloats);
2846 }
2847
2848 return 1;
2849}
2850
2851//------------------------------------------------------------------------------
2852void vtkEnSight6BinaryReader::PrintSelf(ostream& os, vtkIndent indent)

Callers 9

ReadGeometryFileMethod · 0.95
ReadScalarsPerNodeMethod · 0.95
ReadVectorsPerNodeMethod · 0.95
ReadTensorsPerNodeMethod · 0.95
ReadScalarsPerElementMethod · 0.95
ReadVectorsPerElementMethod · 0.95
ReadTensorsPerElementMethod · 0.95

Calls 1

readMethod · 0.45

Tested by

no test coverage detected