Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Classes | Namespaces | Concepts | Typedefs | Functions
reduction_output.hpp File Reference

Shared host-output handling for synchronous scalar reductions. More...

#include <uni20/linalg/kernel_attempt.hpp>
#include <uni20/mdspan/concepts.hpp>
#include <uni20/tensor/access.hpp>
#include <uni20/tensor/concepts.hpp>
#include <concepts>
#include <cstddef>
#include <functional>
#include <type_traits>
#include <utility>
Include dependency graph for reduction_output.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  uni20::linalg::reduction_detail::HostOutputType< Output, bool >
 
struct  uni20::linalg::reduction_detail::HostOutputType< Output, true >
 

Namespaces

namespace  uni20
 
namespace  uni20::linalg
 
namespace  uni20::linalg::reduction_detail
 

Concepts

concept  uni20::linalg::reduction_detail::HostOutput
 Reduction output that is either a host scalar or host-writable mdspec.
 

Typedefs

template<class Output >
using uni20::linalg::reduction_detail::host_output_t = typename HostOutputType< Output >::type
 Resolved output type used by a host reduction backend probe.
 

Functions

template<class Output , class Scalar , std::size_t Rank>
consteval bool uni20::linalg::reduction_detail::output_is_supported ()
 Report whether an output can receive a reduction value of fixed rank.
 
template<class Output , class Function >
KernelAttempt uni20::linalg::reduction_detail::with_host_output (Output &output, Function &&function)
 Invoke a synchronous reduction with a resolved host output.
 
template<class Output , class Scalar >
void uni20::linalg::reduction_detail::write_host_output (Output &output, Scalar value)
 Store a scalar in either a resolved rank-zero mdspan or C++ scalar.
 

Detailed Description

Shared host-output handling for synchronous scalar reductions.