libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
integer_power.hpp File Reference
#include "config.h"
#include "debug_defines.hpp"
#include <boost/static_assert.hpp>
#include <functional>
Include dependency graph for integer_power.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  jmmcg::LIBJMMCG_VER_NAMESPACE::sign< V >
 The result is true if the value V is positive, otherwise false. More...
 
struct  jmmcg::LIBJMMCG_VER_NAMESPACE::modulus< V >
 The result is the modulus of the value, V. More...
 
struct  jmmcg::LIBJMMCG_VER_NAMESPACE::invert_if< V, A >
 Invert the value V if the boolean A is false. More...
 
struct  jmmcg::LIBJMMCG_VER_NAMESPACE::invert_if< V, false >
 
struct  jmmcg::LIBJMMCG_VER_NAMESPACE::binary_right_to_left::dyn::pow< V, 0 >
 
struct  jmmcg::LIBJMMCG_VER_NAMESPACE::binary_right_to_left::dyn::pow< V, 1 >
 
struct  jmmcg::LIBJMMCG_VER_NAMESPACE::binary_right_to_left::dyn::pow< V, P >
 
struct  jmmcg::LIBJMMCG_VER_NAMESPACE::binary_right_to_left::mpl::private_::pow< 0, Res, Z >
 
struct  jmmcg::LIBJMMCG_VER_NAMESPACE::binary_right_to_left::mpl::private_::pow< P, Res, Z >
 
struct  jmmcg::LIBJMMCG_VER_NAMESPACE::binary_right_to_left::mpl::pow< V, 0 >
 
struct  jmmcg::LIBJMMCG_VER_NAMESPACE::binary_right_to_left::mpl::pow< V, 1 >
 
struct  jmmcg::LIBJMMCG_VER_NAMESPACE::binary_right_to_left::mpl::pow< V, P >
 The class to compute the result of raising a value V to an integer power P, at compile-time. More...
 

Namespaces

namespace  jmmcg
 Link with -lrt to include these functions.
 
namespace  jmmcg::LIBJMMCG_VER_NAMESPACE
 
namespace  jmmcg::LIBJMMCG_VER_NAMESPACE::binary_right_to_left
 An implementation of the binary-right-to-left method of exponentiation for raising a number to positive, integer power.
 
namespace  jmmcg::LIBJMMCG_VER_NAMESPACE::binary_right_to_left::dyn
 For types for which operator*() cannot be computed at compile-time, this variant unrolls the exponentiation at compile-time.
 
namespace  jmmcg::LIBJMMCG_VER_NAMESPACE::binary_right_to_left::mpl
 For types for which operator*() can be computed at compile-time, this variant computes the entire exponentiation at compile-time.
 
namespace  jmmcg::LIBJMMCG_VER_NAMESPACE::binary_right_to_left::mpl::private_
 

Functions

template<long P, typename V >
 jmmcg::LIBJMMCG_VER_NAMESPACE::__attribute__ ((const)) const V __fastcall FORCE_INLINE pow(const V v)
 At compile-time, using the binary-right-to-left method, unroll the exponentiation of raising the value V to the integer power of P. More...