From 864d4002db7962600d3e0f3e0db118de8f6f9f47 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 20 Mar 2019 11:21:01 -0700 Subject: uhd: Remove cal containers They are currently unused, and may need reimplementation. For the time being, they can go out of the codebase. --- host/lib/cal/power_container_impl.cpp | 70 ----------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 host/lib/cal/power_container_impl.cpp (limited to 'host/lib/cal/power_container_impl.cpp') diff --git a/host/lib/cal/power_container_impl.cpp b/host/lib/cal/power_container_impl.cpp deleted file mode 100644 index f5dd68ae9..000000000 --- a/host/lib/cal/power_container_impl.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright 2016 Ettus Research -// Copyright 2018 Ettus Research, a National Instruments Company -// -// SPDX-License-Identifier: GPL-3.0-or-later -// - -#include "power_container_impl.hpp" -#include -#include - -using namespace uhd; -using namespace uhd::cal; - -power_container::sptr power_container::make() -{ - return power_container::sptr(new power_container_impl()); -} - -power_container_impl::power_container_impl() : - _nargs(0), _mode(interp_mode_t::NEAREST) -{ - /* NOP */ -} - -double power_container_impl::get(const std::vector &args) -{ - this->verify_nargs(args); - switch (_mode) - { - case interp_mode_t::BILINEAR : - return _interpolator.bl_interp(_data, args); - case interp_mode_t::NEAREST : - return _interpolator.nn_interp(_data, args); - default: - return _interpolator.nn_interp(_data, args); - } -} - -void power_container_impl::add(const double output, const std::vector &args) -{ - if (_nargs == 0) - { - _nargs = args.size(); - _mode = _nargs == 2 ? interp_mode_t::BILINEAR : interp_mode_t::NEAREST; - } - this->verify_nargs(args); - _data[args] = output; -} - -void power_container_impl::add_metadata(const power_container::metadata_t &data) -{ - _metadata = data; -} - -const power_container_impl::metadata_t &power_container_impl::get_metadata() -{ - return _metadata; -} - -void power_container_impl::verify_nargs(const std::vector &args) -{ - // Check that the number of arguments expected are correct - if (args.size() != _nargs) { - throw uhd::assertion_error(str(boost::format( - "power_container_impl: Expected %d number of arguments/values instead of %d") - % _nargs % args.size() - )); - } -} -- cgit v1.2.3