aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/convert/convert_common.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/convert/convert_common.hpp')
-rw-r--r--host/lib/convert/convert_common.hpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/host/lib/convert/convert_common.hpp b/host/lib/convert/convert_common.hpp
index 6e73e9436..7ad7f1671 100644
--- a/host/lib/convert/convert_common.hpp
+++ b/host/lib/convert/convert_common.hpp
@@ -20,7 +20,7 @@
#include <uhd/convert.hpp>
#include <uhd/utils/static.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <complex>
#define _DECLARE_CONVERTER(name, in_form, num_in, out_form, num_out, prio) \
@@ -78,17 +78,17 @@ static const int PRIORITY_TABLE = 1;
**********************************************************************/
typedef std::complex<double> fc64_t;
typedef std::complex<float> fc32_t;
-typedef std::complex<boost::int32_t> sc32_t;
-typedef std::complex<boost::int16_t> sc16_t;
-typedef std::complex<boost::int8_t> sc8_t;
+typedef std::complex<int32_t> sc32_t;
+typedef std::complex<int16_t> sc16_t;
+typedef std::complex<int8_t> sc8_t;
typedef double f64_t;
typedef float f32_t;
-typedef boost::int32_t s32_t;
-typedef boost::int16_t s16_t;
-typedef boost::int8_t s8_t;
-typedef boost::uint8_t u8_t;
+typedef int32_t s32_t;
+typedef int16_t s16_t;
+typedef int8_t s8_t;
+typedef uint8_t u8_t;
-typedef boost::uint32_t item32_t;
+typedef uint32_t item32_t;
typedef item32_t (*xtox_t)(item32_t);
@@ -98,16 +98,16 @@ typedef item32_t (*xtox_t)(item32_t);
template <typename T> UHD_INLINE item32_t xx_to_item32_sc16_x1(
const std::complex<T> &num, const double scale_factor
){
- boost::uint16_t real = boost::int16_t(num.real()*float(scale_factor));
- boost::uint16_t imag = boost::int16_t(num.imag()*float(scale_factor));
+ uint16_t real = int16_t(num.real()*float(scale_factor));
+ uint16_t imag = int16_t(num.imag()*float(scale_factor));
return (item32_t(real) << 16) | (item32_t(imag) << 0);
}
template <> UHD_INLINE item32_t xx_to_item32_sc16_x1(
const sc16_t &num, const double
){
- boost::uint16_t real = boost::int16_t(num.real());
- boost::uint16_t imag = boost::int16_t(num.imag());
+ uint16_t real = int16_t(num.real());
+ uint16_t imag = int16_t(num.imag());
return (item32_t(real) << 16) | (item32_t(imag) << 0);
}
@@ -131,8 +131,8 @@ template <typename T> UHD_INLINE std::complex<T> item32_sc16_x1_to_xx(
const item32_t item, const double scale_factor
){
return std::complex<T>(
- T(boost::int16_t(item >> 16)*float(scale_factor)),
- T(boost::int16_t(item >> 0)*float(scale_factor))
+ T(int16_t(item >> 16)*float(scale_factor)),
+ T(int16_t(item >> 0)*float(scale_factor))
);
}
@@ -140,7 +140,7 @@ template <> UHD_INLINE sc16_t item32_sc16_x1_to_xx(
const item32_t item, const double
){
return sc16_t(
- boost::int16_t(item >> 16), boost::int16_t(item >> 0)
+ int16_t(item >> 16), int16_t(item >> 0)
);
}
@@ -163,10 +163,10 @@ UHD_INLINE void item32_sc16_to_xx(
template <typename T> UHD_INLINE item32_t xx_to_item32_sc8_x1(
const std::complex<T> &in0, const std::complex<T> &in1, const double scale_factor
){
- boost::uint8_t real1 = boost::int8_t(in0.real()*float(scale_factor));
- boost::uint8_t imag1 = boost::int8_t(in0.imag()*float(scale_factor));
- boost::uint8_t real0 = boost::int8_t(in1.real()*float(scale_factor));
- boost::uint8_t imag0 = boost::int8_t(in1.imag()*float(scale_factor));
+ uint8_t real1 = int8_t(in0.real()*float(scale_factor));
+ uint8_t imag1 = int8_t(in0.imag()*float(scale_factor));
+ uint8_t real0 = int8_t(in1.real()*float(scale_factor));
+ uint8_t imag0 = int8_t(in1.imag()*float(scale_factor));
return
(item32_t(real0) << 8) | (item32_t(imag0) << 0) |
(item32_t(real1) << 24) | (item32_t(imag1) << 16)
@@ -176,10 +176,10 @@ template <typename T> UHD_INLINE item32_t xx_to_item32_sc8_x1(
template <> UHD_INLINE item32_t xx_to_item32_sc8_x1(
const sc16_t &in0, const sc16_t &in1, const double
){
- boost::uint8_t real1 = boost::int8_t(in0.real());
- boost::uint8_t imag1 = boost::int8_t(in0.imag());
- boost::uint8_t real0 = boost::int8_t(in1.real());
- boost::uint8_t imag0 = boost::int8_t(in1.imag());
+ uint8_t real1 = int8_t(in0.real());
+ uint8_t imag1 = int8_t(in0.imag());
+ uint8_t real0 = int8_t(in1.real());
+ uint8_t imag0 = int8_t(in1.imag());
return
(item32_t(real0) << 8) | (item32_t(imag0) << 0) |
(item32_t(real1) << 24) | (item32_t(imag1) << 16)
@@ -189,10 +189,10 @@ template <> UHD_INLINE item32_t xx_to_item32_sc8_x1(
template <> UHD_INLINE item32_t xx_to_item32_sc8_x1(
const sc8_t &in0, const sc8_t &in1, const double
){
- boost::uint8_t real1 = boost::int8_t(in0.real());
- boost::uint8_t imag1 = boost::int8_t(in0.imag());
- boost::uint8_t real0 = boost::int8_t(in1.real());
- boost::uint8_t imag0 = boost::int8_t(in1.imag());
+ uint8_t real1 = int8_t(in0.real());
+ uint8_t imag1 = int8_t(in0.imag());
+ uint8_t real0 = int8_t(in1.real());
+ uint8_t imag0 = int8_t(in1.imag());
return
(item32_t(real0) << 8) | (item32_t(imag0) << 0) |
(item32_t(real1) << 24) | (item32_t(imag1) << 16)
@@ -225,12 +225,12 @@ template <typename T> UHD_INLINE void item32_sc8_x1_to_xx(
const item32_t item, std::complex<T> &out0, std::complex<T> &out1, const double scale_factor
){
out1 = std::complex<T>(
- T(boost::int8_t(item >> 8)*float(scale_factor)),
- T(boost::int8_t(item >> 0)*float(scale_factor))
+ T(int8_t(item >> 8)*float(scale_factor)),
+ T(int8_t(item >> 0)*float(scale_factor))
);
out0 = std::complex<T>(
- T(boost::int8_t(item >> 24)*float(scale_factor)),
- T(boost::int8_t(item >> 16)*float(scale_factor))
+ T(int8_t(item >> 24)*float(scale_factor)),
+ T(int8_t(item >> 16)*float(scale_factor))
);
}
@@ -238,12 +238,12 @@ template <> UHD_INLINE void item32_sc8_x1_to_xx(
const item32_t item, sc16_t &out0, sc16_t &out1, const double
){
out1 = sc16_t(
- boost::int16_t(boost::int8_t(item >> 8)),
- boost::int16_t(boost::int8_t(item >> 0))
+ int16_t(int8_t(item >> 8)),
+ int16_t(int8_t(item >> 0))
);
out0 = sc16_t(
- boost::int16_t(boost::int8_t(item >> 24)),
- boost::int16_t(boost::int8_t(item >> 16))
+ int16_t(int8_t(item >> 24)),
+ int16_t(int8_t(item >> 16))
);
}
@@ -251,12 +251,12 @@ template <> UHD_INLINE void item32_sc8_x1_to_xx(
const item32_t item, sc8_t &out0, sc8_t &out1, const double
){
out1 = sc8_t(
- boost::int8_t(boost::int8_t(item >> 8)),
- boost::int8_t(boost::int8_t(item >> 0))
+ int8_t(int8_t(item >> 8)),
+ int8_t(int8_t(item >> 0))
);
out0 = sc8_t(
- boost::int8_t(boost::int8_t(item >> 24)),
- boost::int8_t(boost::int8_t(item >> 16))
+ int8_t(int8_t(item >> 24)),
+ int8_t(int8_t(item >> 16))
);
}