[vtk-developers] ComputeRange setting array's information object
David Gobbi
david.gobbi at gmail.com
Tue May 27 17:11:02 EDT 2014
Hi All,
I was looking at vtkDataArray's ComputeRange code, and saw these:
void vtkDataArray::ComputeRange(double range[2], int comp)
line 1102: info->Set( PER_COMPONENT(), infoVec );
line 1112: infoVec->SetNumberOfInformationObjects( this->NumberOfComponents );
line 1154: info->Set( rkey, range, 2 );
Now, I always understood that it was necessary to be careful with
calling GetRange() as far as thread safety is concerned. However,
these info->Set... calls surprised me. Their presence means that
ComputeRange() is non-reentrant in a very bad way.
Is there a reason why ComputeRange() has to modify the array's
info object?
David
More information about the vtk-developers
mailing list