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, 8 > Struct Template Reference

#include <bit_vector.hpp>

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

Static Public Member Functions

static int call (T bits)
 

Detailed Description

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

Definition at line 66 of file bit_vector.hpp.

Member Function Documentation

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

Definition at line 67 of file bit_vector.hpp.

67  {
68  bits = (bits & 0x5555555555555555LLU) + (bits >> 1 & 0x5555555555555555LLU);
69  bits = (bits & 0x3333333333333333LLU) + (bits >> 2 & 0x3333333333333333LLU);
70  bits = (bits & 0x0f0f0f0f0f0f0f0fLLU) + (bits >> 4 & 0x0f0f0f0f0f0f0f0fLLU);
71  bits = (bits & 0x00ff00ff00ff00ffLLU) + (bits >> 8 & 0x00ff00ff00ff00ffLLU);
72  bits = (bits & 0x0000ffff0000ffffLLU) + (bits >>16 & 0x0000ffff0000ffffLLU);
73  return (bits & 0x00000000ffffffffLLU) + (bits >>32 & 0x00000000ffffffffLLU);
74  }

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