MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
mtl::detail::contiguous_storage Concept Reference

A collection whose elements are laid out from a host address: dense vectors and matrices, strided references, and views over a caller's buffer. More...

#include <same_object.hpp>

Concept definition

template<typename T>
concept mtl::detail::contiguous_storage = requires(const T& t) {
t.data();
t.size();
|| requires(const T& t) { { t.begin() } -> std::convertible_to<const volatile void*>; })
A collection whose elements are laid out from a host address: dense vectors and matrices,...
Definition same_object.hpp:55
constexpr bool data_is_element_address
Whether t.data() is the address of t's elements.
Definition same_object.hpp:28

Detailed Description

A collection whose elements are laid out from a host address: dense vectors and matrices, strided references, and views over a caller's buffer.

A container whose handle is not an element pointer qualifies only where the host can address it; elsewhere its handles mean nothing to the host, and the alias checks assume the worst.