summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/buffer_context.cc
blob: 9cd27add3625e5bf7717653ea476cacf1fe246c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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