Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
tensor.hpp
Go to the documentation of this file.
1#pragma once
2
9#include "access.hpp"
10#include "basic_tensor.hpp"
11#include "conjugate.hpp"
12#include "generated.hpp"
14#include "output.hpp"
15#include "precision.hpp"
16#include "reshape.hpp"
17
18#if UNI20_BACKEND_CUDA
21#endif
22
23#include <cstddef>
24#include <type_traits>
25
26namespace uni20
27{
28
30using RowMajor = stdex::layout_right;
31
33using ColumnMajor = stdex::layout_left;
34
36template <typename ElementType, std::size_t Rank, typename StoragePolicy = HostStorage,
37 typename AccessorFactory = detail::tensor_accessor_factory_t<StoragePolicy>>
39
41template <typename ElementType, std::size_t Rank, typename StoragePolicy = HostStorage,
42 typename AccessorFactory = detail::tensor_accessor_factory_t<StoragePolicy>>
44
46template <typename ElementType, std::size_t Rank, typename StoragePolicy = HostStorage,
47 typename AccessorFactory = detail::tensor_accessor_factory_t<StoragePolicy>>
49
51template <typename ElementType, typename StoragePolicy = HostStorage,
52 typename AccessorFactory = detail::tensor_accessor_factory_t<StoragePolicy>>
54
60template <typename ElementType, typename LayoutPolicy = ColumnMajor>
62
63#if UNI20_BACKEND_CUDA
72template <typename ElementType, std::size_t Rank, typename LayoutPolicy = ColumnMajor>
73 requires std::is_trivially_copyable_v<ElementType>
75
77template <typename ElementType, typename LayoutPolicy = ColumnMajor>
78using CudaMatrix = CudaTensor<ElementType, 2, LayoutPolicy>;
79#endif
80
81} // namespace uni20
RAII leases that resolve device descriptors and tensor views to mdspans.
Owning tensor implementation and configurable extents alias.
General-purpose owning tensor with immediate or deferred mdspan metadata.
Definition basic_tensor.hpp:109
Read-only lazy conjugation views for tensor-level objects.
CUDA data-handle acquisition for buffer descriptors and tensor views.
CUDA Tensor storage with deferred device-memory data descriptors.
Compact read-only tensors whose values are generated from their indices.
Concrete tensor-level views over owned mdspan or mdspec metadata.
Definition async/async.hpp:26
stdex::layout_left ColumnMajor
Conventional column-major contiguous mdspan layout.
Definition tensor.hpp:33
stdex::layout_right RowMajor
Conventional row-major contiguous mdspan layout.
Definition tensor.hpp:30
Explicit aliasing, in-place, and owning tensor reshape operations.
Default pageable-host tensor storage policy.
Definition host_storage.hpp:316
Shape preparation contracts for tensor operation outputs.