Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
uni20::HostStorage Struct Reference

Default pageable-host tensor storage policy. More...

#include <host_storage.hpp>

Public Types

using backend_selector_type = linalg::backend_list< linalg::LapackBackend, linalg::CpuReferenceBackend >
 
template<typename ElementType >
using storage_t = HostBuffer< ElementType >
 

Static Public Member Functions

static constexpr auto backend_selector () noexcept -> backend_selector_type
 Return the default ordered linalg backends for pageable host storage.
 
template<typename ElementType >
static auto make_handle (storage_t< ElementType > &storage) noexcept -> ElementType *
 
template<typename ElementType >
static auto make_handle (storage_t< ElementType > const &storage) noexcept -> ElementType const *
 
template<typename ElementType >
static auto make_storage (std::size_t size, StorageInitialization initialization) -> storage_t< ElementType >
 Allocate host elements with the requested numerical initialization.
 

Static Public Attributes

static constexpr std::size_t allocation_alignment = 64
 Guaranteed byte alignment of every HostBuffer allocation.
 

Detailed Description

Default pageable-host tensor storage policy.

Uses HostBuffer for aligned allocation and selects the available host BLAS/LAPACK and reference backends.

Member Typedef Documentation

◆ backend_selector_type

◆ storage_t

template<typename ElementType >
using uni20::HostStorage::storage_t = HostBuffer<ElementType>

Member Function Documentation

◆ backend_selector()

static constexpr auto uni20::HostStorage::backend_selector ( ) -> backend_selector_type
inlinestaticconstexprnoexcept

Return the default ordered linalg backends for pageable host storage.

◆ make_handle() [1/2]

template<typename ElementType >
static auto uni20::HostStorage::make_handle ( storage_t< ElementType > &  storage) -> ElementType*
inlinestaticnoexcept

◆ make_handle() [2/2]

template<typename ElementType >
static auto uni20::HostStorage::make_handle ( storage_t< ElementType > const &  storage) -> ElementType const*
inlinestaticnoexcept

◆ make_storage()

template<typename ElementType >
static auto uni20::HostStorage::make_storage ( std::size_t  size,
StorageInitialization  initialization 
) -> storage_t<ElementType>
inlinestatic

Allocate host elements with the requested numerical initialization.

Member Data Documentation

◆ allocation_alignment

constexpr std::size_t uni20::HostStorage::allocation_alignment = 64
staticconstexpr

Guaranteed byte alignment of every HostBuffer allocation.


The documentation for this struct was generated from the following file: