11 if constexpr (has_runtime_precision_v<S>)
13 if constexpr (
requires { input.default_precision(); })
14 return input.default_precision();
16 throw std::logic_error(
"tensor: no default working precision was supplied");
19 return native_precision<S>();
28 require_precision<S>(
p);
29 auto result =
Tensor(input);
30 if constexpr (has_runtime_precision_v<S>)
32 result.default_precision(
p);
33 for (
auto&
value : result.storage())
Owning tensor implementation and configurable extents alias.
Exact arithmetic or an explicit binary working precision.
Definition core/precision.hpp:13
General-purpose owning tensor with immediate or deferred mdspan metadata.
Definition basic_tensor.hpp:109
locale_t value
Definition data_table.cpp:49
Definition data_table.cpp:8
Definition async/async.hpp:26
auto at_precision(Input const &input, Precision p)
Materialize an owning tensor with every element converted to p.
Definition tensor/precision.hpp:25
constexpr Precision precision_of(T const &value)
Read scalar precision without changing any scalar or provider state.
Definition runtime_precision.hpp:53
constexpr Precision common_precision(Precision a, Precision b)
Combine precisions, treating exact values as neutral and rejecting unequal finite precisions.
Definition core/precision.hpp:57
constexpr Precision common_default_precision(A const &a, B const &b)
Select a binary operation's default without inspecting element precisions.
Definition tensor/precision.hpp:43
std::remove_cv_t< typename tensor_mdspec_t< T >::element_type > tensor_element_t
Scalar value type exposed by a tensor-level object.
Definition tensor/concepts.hpp:126