GNU Radio Manual and C++ API Reference  3.9.1.0
The Free & Open Software Radio Ecosystem
count_bits.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2003,2013 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef _GR_COUNT_BITS_H_
12 #define _GR_COUNT_BITS_H_
13 
14 #include <gnuradio/blocks/api.h>
15 
16 namespace gr {
17 namespace blocks {
18 
19 //! return number of set bits in the low 8 bits of x
20 BLOCKS_API unsigned int count_bits8(unsigned int x);
21 
22 //! return number of set bits in the low 16 bits of x
23 BLOCKS_API unsigned int count_bits16(unsigned int x);
24 
25 //! return number of set bits in the low 32 bits of x
26 BLOCKS_API unsigned int count_bits32(unsigned int x);
27 
28 //! return number of set bits in a 64-bit word
29 BLOCKS_API unsigned int count_bits64(unsigned long long int x);
30 
31 } /* namespace blocks */
32 } /* namespace gr */
33 
34 #endif /* _GR_COUNT_BITS_H_ */
api.h
BLOCKS_API
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:18
gr::blocks::count_bits8
BLOCKS_API unsigned int count_bits8(unsigned int x)
return number of set bits in the low 8 bits of x
gr::blocks::count_bits64
BLOCKS_API unsigned int count_bits64(unsigned long long int x)
return number of set bits in a 64-bit word
gr
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:29
gr::blocks::count_bits16
BLOCKS_API unsigned int count_bits16(unsigned int x)
return number of set bits in the low 16 bits of x
gr::blocks::count_bits32
BLOCKS_API unsigned int count_bits32(unsigned int x)
return number of set bits in the low 32 bits of x