MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / util_areAnyVectorElemsWithinNode

Function util_areAnyVectorElemsWithinNode

quest/src/core/utilities.cpp:920–936  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

918 */
919
920bool util_areAnyVectorElemsWithinNode(int rank, qindex numElemsPerNode, qindex elemStartInd, qindex numInds) {
921
922 qindex elemEndIndExcl = elemStartInd + numInds;
923 qindex nodeStartInd = numElemsPerNode * rank;
924 qindex nodeEndIndExcl = nodeStartInd + numElemsPerNode;
925
926 // 'no' if all targeted elems occur after this node
927 if (elemStartInd >= nodeEndIndExcl)
928 return false;
929
930 // 'no' if all targeted elems occur before this node
931 if (elemEndIndExcl <= nodeStartInd)
932 return false;
933
934 // otherwise yes; this node MUST contain one or more targeted elems
935 return true;
936}
937
938util_VectorIndexRange util_getLocalIndRangeOfVectorElemsWithinNode(int rank, qindex numElemsPerNode, qindex elemStartInd, qindex numInds) {
939

Calls

no outgoing calls

Tested by

no test coverage detected