Scroom  0.14
BitCountLut Class Reference
Collaboration diagram for BitCountLut:
Collaboration graph

Public Member Functions

 BitCountLut ()
 
byte lookup (byte index)
 

Private Attributes

byte lut [256]
 

Constructor & Destructor Documentation

◆ BitCountLut()

BitCountLut::BitCountLut ( )
49 {
50  for(int i = 0; i < 256; i++)
51  {
52  int sum = 0;
53  for(int v = i; v; v >>= 1)
54  {
55  sum += v & 1;
56  }
57  lut[i] = sum;
58  }
59 }

Member Function Documentation

◆ lookup()

byte BitCountLut::lookup ( byte  index)
inline
61 { return lut[index]; }

Referenced by Operations1bpp::reduce(), and Operations1bppClipped::reduce().

Here is the caller graph for this function:

Member Data Documentation

◆ lut

byte BitCountLut::lut[256]
private

The documentation for this class was generated from the following file:
BitCountLut::lut
byte lut[256]
Definition: layeroperations.cc:37