MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / FileNumber

Method FileNumber

Src/Base/AMReX_NFiles.H:146–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144 static bool CheckNFiles(int nProcs, int nOutFiles, bool groupSets);
145
146 static int FileNumber(int nOutFiles, int whichProc, bool groupSets)
147 {
148 BL_ASSERT(whichProc >= 0 && whichProc < ParallelDescriptor::NProcs());
149
150 int anf(ActualNFiles(nOutFiles));
151 if(groupSets) {
152 return(whichProc % anf);
153 } else {
154
155 int nProcs(ParallelDescriptor::NProcs());
156 return(whichProc / LengthOfSet(nProcs, anf));
157 }
158 }
159
160 [[nodiscard]] const std::string &FileName() const { return fullFileName; }
161 [[nodiscard]] int FileNumber() const { return fileNumber; }

Callers 1

Calls 1

NProcsFunction · 0.70

Tested by

no test coverage detected