diff options
Diffstat (limited to 'gnuradio-runtime/lib/buffer_context.cc')
-rw-r--r-- | gnuradio-runtime/lib/buffer_context.cc | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gnuradio-runtime/lib/buffer_context.cc b/gnuradio-runtime/lib/buffer_context.cc new file mode 100644 index 0000000000..9cd27add36 --- /dev/null +++ b/gnuradio-runtime/lib/buffer_context.cc @@ -0,0 +1,32 @@ +/* -*- c++ -*- */ +/* + * Copyright 2021 BlackLynx, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include <gnuradio/buffer_context.h> + +namespace gr { + +std::ostream& operator<<(std::ostream& os, const buffer_context& context) +{ + switch (context) { + case buffer_context::DEFAULT_INVALID: + return os << "DEFAULT_INVALID"; + case buffer_context::HOST_TO_DEVICE: + return os << "HOST_TO_DEVICE"; + case buffer_context::DEVICE_TO_HOST: + return os << "DEVICE_TO_HOST"; + case buffer_context::HOST_TO_HOST: + return os << "HOST_TO_HOST"; + case buffer_context::DEVICE_TO_DEVICE: + return os << "DEVICE_TO_DEVICE"; + default: + return os << "Unknown buffer context: " << static_cast<int>(context); + } +} + +} // namespace gr |