Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Classes | Namespaces | Concepts | Enumerations | Functions
presentation_mdspan.hpp File Reference
#include "presentation.hpp"
#include <algorithm>
#include <array>
#include <concepts>
#include <cstddef>
#include <functional>
#include <limits>
#include <optional>
#include <stdexcept>
#include <string>
#include <string_view>
#include <type_traits>
#include <utility>
#include <vector>
Include dependency graph for presentation_mdspan.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  uni20::presentation::mdspan_format_options
 Formatting controls for mdspan and tensor display art. More...
 
struct  uni20::presentation::mdspan_matrix_axes
 Matrix axes used when rendering rank-2-or-higher tensors. More...
 
struct  uni20::presentation::mdspan_preview_options
 Bounded preview controls for mdspan and tensor display. More...
 
struct  uni20::presentation::mdspan_preview_result
 Result of bounded mdspan preview rendering. More...
 

Namespaces

namespace  uni20
 
namespace  uni20::presentation
 

Concepts

concept  uni20::presentation::mdspan_like
 Detect mdspan-like objects without depending on trace or tensor.
 

Enumerations

enum class  uni20::presentation::mdspan_shape_mode { uni20::presentation::none , uni20::presentation::prefix }
 Selects whether mdspan/tensor art includes shape metadata. More...
 

Functions

template<mdspan_like MDS, typename ElementFormatter >
requires (!std::same_as<std::remove_cvref_t<ElementFormatter>, mdspan_format_options>)
std::string uni20::presentation::format_mdspan (MDS const &mds, output_policy const &policy, ElementFormatter &&formatter, mdspan_format_options const &options={})
 Render every mdspan/tensor element as display-cell-aligned text art.
 
template<mdspan_like MDS>
std::string uni20::presentation::format_mdspan (MDS const &mds, output_policy const &policy, mdspan_format_options const &options={})
 Render every mdspan/tensor element using default scalar numeric formatting.
 
template<mdspan_like MDS, typename ElementFormatter >
requires (!std::same_as<std::remove_cvref_t<ElementFormatter>, mdspan_preview_options>)
mdspan_preview_result uni20::presentation::format_mdspan_preview (MDS const &mds, output_policy const &policy, ElementFormatter &&formatter, mdspan_preview_options const &options={})
 Render a bounded mdspan/tensor preview without visiting omitted elements.
 
template<mdspan_like MDS>
mdspan_preview_result uni20::presentation::format_mdspan_preview (MDS const &mds, output_policy const &policy, mdspan_preview_options const &options={})
 Render a bounded mdspan/tensor preview using default scalar numeric formatting.