#pragma once #include "host_tensor.hpp" #include "common_header.hpp" #include "tensor_descriptor.hpp" template auto make_HostTensorDescriptor_impl(TensorDesc, std::integer_sequence) { std::initializer_list lengths = {TensorDesc::GetLengths()[Is]...}; std::initializer_list strides = {TensorDesc::GetStrides()[Is]...}; return HostTensorDescriptor(lengths, strides); } template auto make_HostTensorDescriptor(TensorDesc) { return make_HostTensorDescriptor_impl( TensorDesc{}, std::make_integer_sequence{}); } template void ostream_tensor_descriptor(TensorDesc, std::ostream& os = std::cout) { ostream_HostTensorDescriptor(make_HostTensorDescriptor(TensorDesc{}), os); }