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

Method IsReaderRank

IO/ParallelNetCDF/vtkPNetCDFPOPReader.cxx:692–704  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Returns true if the calling process should read data from the netCDF file

Source from the content-addressed store, hash-verified

690//------------------------------------------------------------------------------
691// Returns true if the calling process should read data from the netCDF file
692bool vtkPNetCDFPOPReader::IsReaderRank()
693{
694 int rank = this->Controller->GetLocalProcessId();
695 for (size_t i = 0; i < this->Internals->ReaderRanks.size(); i++)
696 {
697 int ii = static_cast<int>(i);
698 if (rank == this->Internals->ReaderRanks[ii])
699 {
700 return true;
701 }
702 }
703 return false;
704}
705
706//------------------------------------------------------------------------------
707// Similar to above, but returns true only if the calling process is the first

Callers 1

RequestInformationMethod · 0.95

Calls 2

GetLocalProcessIdMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected