| USRP Hardware Driver and USRP Manual Version: 4.8.0.makepkg-0-g308126a4 UHD and USRP Manual |

Loading...
Searching...
No Matches
Namespaces | Enumerations | Functions
uhd::math Namespace Reference

## Namespaces
namespace | fp_compare

## Enumerations
enum class | interp_mode { NEAREST_NEIGHBOR , LINEAR }

## Functions
UHD_INLINE bool | frequencies_are_equal (double lhs, double rhs)
double | dB_to_lin (const double dB_val)
double | lin_to_dB (const double val)
template<typename IntegerType>
IntegerType | lcm (IntegerType x, IntegerType y)
| Portable version of lcm() across Boost versions.
template<typename IntegerType>
IntegerType | gcd (IntegerType x, IntegerType y)
| Portable version of gcd() across Boost versions.
template<typename T>
constexpr int | sign (T x)
| Returns the sign of x.
double | wrap_frequency (const double requested_freq, const double rate)
| Return a wrapped frequency that is the equivalent frequency in the first.

## Detailed Description

Contains useful mathematical functions, classes, and constants, which should be used in UHD when portable / `std` options are not available.

## Enumeration Type Documentation

## ◆ interp_mode

enum class uhd::math::interp_mode
| strong

Enumerator
NEAREST_NEIGHBOR |
LINEAR |

## Function Documentation

## ◆ dB_to_lin()

double uhd::math::dB_to_lin | ( | const double | dB_val | ) |
| inline

## ◆ frequencies_are_equal()

UHD_INLINE bool uhd::math::frequencies_are_equal | ( | double | lhs,
|  | double | rhs )

## ◆ gcd()

template<typename IntegerType>

IntegerType uhd::math::gcd | ( | IntegerType | x,
|  | IntegerType | y )
| inline

Portable version of gcd() across Boost versions.

## ◆ lcm()

template<typename IntegerType>

IntegerType uhd::math::lcm | ( | IntegerType | x,
|  | IntegerType | y )
| inline

Portable version of lcm() across Boost versions.

## ◆ lin_to_dB()

double uhd::math::lin_to_dB | ( | const double | val | ) |
| inline

## ◆ sign()

template<typename T>

int uhd::math::sign | ( | T | x | ) |
| inline constexpr

Returns the sign of x.

## ◆ wrap_frequency()

double uhd::math::wrap_frequency | ( | const double | requested_freq,
|  | const double | rate )
| inline

Return a wrapped frequency that is the equivalent frequency in the first.