<commit_before>/*!
  \file	src/include/bits.h
  \author	Samuel
  \version 	3.0
  \date	
  			Created: 3:29 PM 07-Apr-08
  			Last modified: Mon Jun 16, 2008  10:44AM
  \brief	Contains bit manipulation macros.
*/

#ifndef _BITS_H_
#define _BITS_H_

#include <ace.h>

/* Extracts bit value in src from xth bit to yth bit inclusive.
 * x and y are measured from lsb and x < y. x=1 means 1st bit.
 */
#define EXTRACT_BITS(src, x, y) \
    (((unsigned long int)src<<(32-y))>>(32-y+x-1))

inline int GetBitFromBitArray(void * bit_array, UINT32 bit_index);
inline void SetBitInBitArray(void * bit_array, UINT32 bit_index);
inline void ClearBitInBitArray(void * bit_array, UINT32 bit_index);
inline UINT32 FindFirstSetBitInBitArray(void * bit_array, UINT32 length, UINT32 * result);
inline UINT32 FindFirstClearBitInBitArray(void * bit_array, UINT32 length, UINT32 * result);
	   
#endif<commit_msg>Updated EXTRACT_BITS by removing the constant 32 and adding appropriate value.<commit_after>/*!
  \file	src/include/bits.h
  \author	Samuel
  \version 	3.0
  \date	
  			Created: 3:29 PM 07-Apr-08
  			Last modified: Mon Jun 16, 2008  10:44AM
  \brief	Contains bit manipulation macros.
*/

#ifndef _BITS_H_
#define _BITS_H_

#include <ace.h>

/* Extracts bit value in src from xth bit to yth bit inclusive.
 * x and y are measured from lsb and x < y. x=1 means 1st bit.
 */
#define EXTRACT_BITS(src, x, y) \
    (((unsigned long int)src<<((sizeof(unsigned long int)*BITS_PER_BYTE)-y))>>((sizeof(unsigned long int)*BITS_PER_BYTE)-y+x-1))

inline int GetBitFromBitArray(void * bit_array, UINT32 bit_index);
inline void SetBitInBitArray(void * bit_array, UINT32 bit_index);
inline void ClearBitInBitArray(void * bit_array, UINT32 bit_index);
inline UINT32 FindFirstSetBitInBitArray(void * bit_array, UINT32 length, UINT32 * result);
inline UINT32 FindFirstClearBitInBitArray(void * bit_array, UINT32 length, UINT32 * result);
	   
#endif
{'fraction_non_alphanumeric': 0.10441558441558442, 'fraction_numerical': 0.044675324675324674, 'mean_word_length': 4.35, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7519233', 'n_tokens_mistral': 735, 'n_tokens_neox': 672, 'n_words': 209}