1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! Borrowed views of device-resident matrices and vectors.
//!
//! Pure data — no hidden device allocations, no driver state. Plans
//! cache *selection metadata* on top of these descriptors but never own
//! device memory.
//!
//! The type parameter `T` is bounded by [`DeviceRepr`] (not by the
//! [`crate::Element`] / [`crate::IntElement`] traits) so the same view
//! structs can be re-used across float kernels, integer kernels, and
//! arbitrary scalar-typed bias / aux buffers. Semantic enforcement
//! (which element types a given plan accepts) happens at the plan layer
//! via the appropriate trait bound.
use ;
use DeviceRepr;
/// Read-only view of a device-resident matrix.
///
/// `ld` is the leading dimension in **elements** (not bytes), measured
/// along the major axis dictated by the layout: row-stride for row-major
/// matrices, column-stride for column-major matrices.
/// Mutable view of a device-resident matrix (used for the output `D`).
///
/// See [`MatrixRef`] for the rationale behind the relaxed `T` bound.
/// Read-only view of a device-resident vector.
///
/// See [`MatrixRef`] for the rationale behind the relaxed `T` bound.