atMostOneBitIsSet(i) provides an extremely fast way to determine whether an integral type is either zero or consists of a single set bit.  
More...
atMostOneBitIsSet(i) provides an extremely fast way to determine whether an integral type is either zero or consists of a single set bit. 
This question arises when using bits to represent set membership where one may wish to verify that an integer represents a single element rather than a set of elements.
- See also
 - exactlyOneBitIsSet() 
 
◆ atMostOneBitIsSet() [1/11]
  
  
      
        
          | bool SimTK::atMostOneBitIsSet  | 
          ( | 
          unsigned char  | 
          v | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ atMostOneBitIsSet() [2/11]
  
  
      
        
          | bool SimTK::atMostOneBitIsSet  | 
          ( | 
          unsigned short  | 
          v | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ atMostOneBitIsSet() [3/11]
  
  
      
        
          | bool SimTK::atMostOneBitIsSet  | 
          ( | 
          unsigned int  | 
          v | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ atMostOneBitIsSet() [4/11]
  
  
      
        
          | bool SimTK::atMostOneBitIsSet  | 
          ( | 
          unsigned long  | 
          v | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ atMostOneBitIsSet() [5/11]
  
  
      
        
          | bool SimTK::atMostOneBitIsSet  | 
          ( | 
          unsigned long long  | 
          v | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ atMostOneBitIsSet() [6/11]
  
  
      
        
          | bool SimTK::atMostOneBitIsSet  | 
          ( | 
          signed char  | 
          v | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ atMostOneBitIsSet() [7/11]
  
  
      
        
          | bool SimTK::atMostOneBitIsSet  | 
          ( | 
          char  | 
          v | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ atMostOneBitIsSet() [8/11]
  
  
      
        
          | bool SimTK::atMostOneBitIsSet  | 
          ( | 
          short  | 
          v | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ atMostOneBitIsSet() [9/11]
  
  
      
        
          | bool SimTK::atMostOneBitIsSet  | 
          ( | 
          int  | 
          v | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ atMostOneBitIsSet() [10/11]
  
  
      
        
          | bool SimTK::atMostOneBitIsSet  | 
          ( | 
          long  | 
          v | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ atMostOneBitIsSet() [11/11]
  
  
      
        
          | bool SimTK::atMostOneBitIsSet  | 
          ( | 
          long long  | 
          v | ) | 
           | 
         
       
   | 
  
inline   |