GNU Radio C++ API Reference: count_bits.h Source File

| GNU Radio C++ API Reference 3.10.12.0 The Free & Open Software Radio Ecosystem |

Loading...
Searching...
No Matches
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#include <cstdint>
17
18namespace gr {
19namespace blocks {
20
21//! return number of set bits in the low 8 bits of x
22 BLOCKS_API unsigned int count_bits8(unsigned int x);
23
24//! return number of set bits in the low 16 bits of x
25 BLOCKS_API unsigned int count_bits16(unsigned int x);
26
27//! return number of set bits in the low 32 bits of x
28 BLOCKS_API unsigned int count_bits32(unsigned int x);
29
30//! return number of set bits in a 64-bit word
31 BLOCKS_API unsigned int count_bits64(uint64_t x);
32
33} /* namespace blocks */
34} /* namespace gr */
35
36#endif /* _GR_COUNT_BITS_H_ */
api.h
BLOCKS_API
#define BLOCKS_API
Definition gr-blocks/include/gnuradio/blocks/api.h:18
gr::blocks
Definition abs_blk.h:20
gr::blocks::count_bits64
BLOCKS_API unsigned int count_bits64(uint64_t x)
return number of set bits in a 64-bit word
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
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
GNU Radio logging wrapper.
Definition basic_block.h:29