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

Function getValueOfTargets

tests/deprecated/test_utilities.cpp:810–819  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

808}
809
810long long int getValueOfTargets(long long int ind, int* targs, int numTargs) {
811 DEMAND( ind >= 0 );
812
813 long long int val = 0;
814
815 for (int t=0; t<numTargs; t++)
816 val += ((ind >> targs[t]) & 1) * (1LL << t);
817
818 return val;
819}
820
821long long int setBit(long long int num, int bitInd, int bitVal) {
822 DEMAND( (bitVal == 0 || bitVal == 1) );

Callers 1

getDFTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected