DDC 0.11.0
Loading...
Searching...
No Matches
discrete_element.cpp
1// Copyright (C) The DDC development team, see COPYRIGHT.md file
2//
3// SPDX-License-Identifier: MIT
4
5#include <cstddef>
6#include <ostream>
7
9
10namespace ddc::detail {
11
12void print_discrete_element(
13 std::ostream& os,
14 DiscreteElementType const* const data,
15 std::size_t const n)
16{
17 os << '(';
18 if (n > 0) {
19 os << data[0];
20 for (std::size_t i = 1; i < n; ++i) {
21 os << ", " << data[i];
22 }
23 }
24 os << ')';
25}
26
27} // namespace ddc::detail
The top-level namespace of DDC.