realroot_doc 0.1.1
hdwi< hardware_int > Struct Template Reference

#include <numerics_hdwi.hpp>

List of all members.

Public Types

Static Public Member Functions

Static Public Attributes


Detailed Description

template<class hardware_int>
struct mmx::numerics::hdwi< hardware_int >

Definition at line 47 of file numerics_hdwi.hpp.


Member Typedef Documentation

typedef hardware_int hdw_int

Definition at line 50 of file numerics_hdwi.hpp.


Member Function Documentation

static hdw_int reverse ( hdw_int  a) [inline, static]

Definition at line 54 of file numerics_hdwi.hpp.

References hdwi< hardware_int >::nbit.

Referenced by mmx::reverse().

    {
      hdw_int res = 0;
      for ( unsigned i = 0; i < nbit; i ++ )
        {
          res <<= 1;
          res  |= a & 1;
          a   >>= 1;
        };
      return res;
    };
static void reverse ( unsigned  h,
hdw_int a 
) [inline, static]

Definition at line 65 of file numerics_hdwi.hpp.

    {
      unsigned i;
      hdw_int c;
      c = 0;
      for ( i = 0; i < h; i ++ )
        {
          c <<= 1;
          c |= a&1;
          a >>= 1;
        };
      a = c;
    };

Member Data Documentation

const unsigned nbit = sizeof(hardware_int)*8 [static]

Definition at line 52 of file numerics_hdwi.hpp.

Referenced by hdwi< hardware_int >::reverse().

const T nmax [static]

Definition at line 53 of file numerics_hdwi.hpp.


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