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

Function setBit

tests/deprecated/test_utilities.cpp:821–827  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

819}
820
821long long int setBit(long long int num, int bitInd, int bitVal) {
822 DEMAND( (bitVal == 0 || bitVal == 1) );
823 DEMAND( num >= 0 );
824 DEMAND( bitInd >= 0 );
825
826 return (num & ~(1UL << bitInd)) | (bitVal << bitInd);
827}
828
829long long int getIndexOfTargetValues(long long int ref, int* targs, int numTargs, long long int targVal) {
830 // ref state is the starting index, where the targets can be in any bit state;

Callers 1

getIndexOfTargetValuesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected