STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Attributes
stapl::bitreverse< T > Struct Template Reference

Given a value this functor computes its bitreversed value by considering the least signficant bits specified by ceil(log2(max)) More...

Public Member Functions

 bitreverse (T max)
 Set the number of bits to use by determining the number of bits needed to represent the value provided. More...
 
operator() (T input) const
 Convert a number to its bitreverse value. For example, if the struct is constructed with a max of 32(100000) and the operator receives 2(000010) the operator will return 010000.
 

Public Attributes

unsigned int m_number_of_bits
 

Detailed Description

template<typename T>
struct stapl::bitreverse< T >

Given a value this functor computes its bitreversed value by considering the least signficant bits specified by ceil(log2(max))

Constructor & Destructor Documentation

◆ bitreverse()

template<typename T >
stapl::bitreverse< T >::bitreverse ( max)

Set the number of bits to use by determining the number of bits needed to represent the value provided.

Parameters
max- ceil(log_2(max)) determines the number of bits in bitreverse

The documentation for this struct was generated from the following file: