jubatus_core  0.1.2
Jubatus: Online machine learning framework for distributed environment
Static Public Member Functions | List of all members
jubatus::core::storage::detail::bitcount_impl< T, 4 > Struct Template Reference

#include <bit_vector.hpp>

Collaboration diagram for jubatus::core::storage::detail::bitcount_impl< T, 4 >:
Collaboration graph

Static Public Member Functions

static int call (T bits)
 

Detailed Description

template<typename T>
struct jubatus::core::storage::detail::bitcount_impl< T, 4 >

Definition at line 56 of file bit_vector.hpp.

Member Function Documentation

template<typename T >
static int jubatus::core::storage::detail::bitcount_impl< T, 4 >::call ( bits)
inlinestatic

Definition at line 57 of file bit_vector.hpp.

57  {
58  bits = (bits & 0x55555555LU) + (bits >> 1 & 0x55555555LU);
59  bits = (bits & 0x33333333LU) + (bits >> 2 & 0x33333333LU);
60  bits = (bits & 0x0f0f0f0fLU) + (bits >> 4 & 0x0f0f0f0fLU);
61  bits = (bits & 0x00ff00ffLU) + (bits >> 8 & 0x00ff00ffLU);
62  return (bits & 0x0000ffffLU) + (bits >>16 & 0x0000ffffLU);
63  }

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