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

Method localindex

Src/Base/AMReX_FabArrayBase.H:119–127  ·  view source on GitHub ↗

Return local index in the vector of FABs.

Source from the content-addressed store, hash-verified

117
118 //! Return local index in the vector of FABs.
119 [[nodiscard]] int localindex (int K) const noexcept {
120 auto low = std::ranges::lower_bound(indexArray, K);
121 if (low != indexArray.end() && *low == K) {
122 return static_cast<int>(low - indexArray.begin());
123 }
124 else {
125 return -1;
126 }
127 }
128
129 //! Return constant reference to associated DistributionMapping.
130 [[nodiscard]] const DistributionMapping& DistributionMap () const noexcept { return distributionMap; }

Callers 6

FB_local_copy_gpuMethod · 0.80
LayoutDataClass · 0.80
PC_local_gpuMethod · 0.80

Calls 3

lower_boundFunction · 0.85
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected