// Copyright (c) Advanced Micro Devices, Inc., or its affiliates. // SPDX-License-Identifier: MIT #pragma once #include #include #include #include #include "ck/tensor_description/tensor_descriptor.hpp" namespace ck { template std::ostream& operator<<([[clang::lifetimebound]] std::ostream& os, const std::vector& v) { std::copy(std::begin(v), std::end(v), std::ostream_iterator(os, " ")); return os; } template std::ostream& operator<<(std::ostream& os, const std::array& v) { std::copy(std::begin(v), std::end(v), std::ostream_iterator(os, " ")); return os; } template std::ostream& operator<<([[clang::lifetimebound]] std::ostream& os, const TensorDescriptor& desc) { constexpr index_t nDim = remove_cvref_t::GetNumOfDimension(); os << "{"; static_for<0, nDim - 1, 1>{}([&](auto i) { os << desc.GetLength(i) << ", "; }); os << desc.GetLength(Number{}); os << "}"; return os; } } // namespace ck