Template Helpers in xf::common::utils_hw

template struct xf::common::utils_hw::PowerOf2

#include "xf_utils_hw/common.hpp"

Overview

Template to calculate power of 2.

Parameters:

_N the power to be calculated.
template <int _N>
struct PowerOf2

// fields

static const unsigned value

Fields

static const unsigned value

value of 2^(_N)

template struct xf::common::utils_hw::GCD <_A, 0>

#include "common.hpp"
template <int _A>
struct GCD <_A, 0>

// fields

static const int value

template struct xf::common::utils_hw::LCM

#include "xf_utils_hw/common.hpp"

Overview

Template to calculate Least Common Multiple(LCM) of two integers.

Parameters:

_A an integer
_B the other integer
template <
    int _A,
    int _B
    >
struct LCM

// fields

static const int value

Fields

static const int value

value of LCM of _A and _B