1#![allow(missing_docs)]
25
26use uor_foundation::enforcement::GroundedShape;
27use uor_foundation::pipeline::{ConstrainedTypeShape, ConstraintRef, IntoBindingValue, TermValue};
28
29#[derive(Debug, Clone, Copy)]
37pub struct Tensor3Shape<const D0: usize, const D1: usize, const D2: usize, const ELEM_BYTES: usize>;
38
39impl<const D0: usize, const D1: usize, const D2: usize, const ELEM_BYTES: usize> Default
40 for Tensor3Shape<D0, D1, D2, ELEM_BYTES>
41{
42 fn default() -> Self {
43 Self
44 }
45}
46
47impl<const D0: usize, const D1: usize, const D2: usize, const ELEM_BYTES: usize>
48 ConstrainedTypeShape for Tensor3Shape<D0, D1, D2, ELEM_BYTES>
49{
50 const IRI: &'static str = "https://uor.foundation/type/ConstrainedType";
51 const SITE_COUNT: usize = D0 * D1 * D2 * ELEM_BYTES;
52 const CONSTRAINTS: &'static [ConstraintRef] = &[];
53 #[allow(clippy::cast_possible_truncation)]
54 const CYCLE_SIZE: u64 = 256u64.saturating_pow((D0 * D1 * D2 * ELEM_BYTES) as u32);
55}
56
57impl<const D0: usize, const D1: usize, const D2: usize, const ELEM_BYTES: usize>
58 uor_foundation::pipeline::__sdk_seal::Sealed for Tensor3Shape<D0, D1, D2, ELEM_BYTES>
59{
60}
61impl<const D0: usize, const D1: usize, const D2: usize, const ELEM_BYTES: usize> GroundedShape
62 for Tensor3Shape<D0, D1, D2, ELEM_BYTES>
63{
64}
65impl<'a, const D0: usize, const D1: usize, const D2: usize, const ELEM_BYTES: usize>
66 IntoBindingValue<'a> for Tensor3Shape<D0, D1, D2, ELEM_BYTES>
67{
68 fn as_binding_value<const INLINE_BYTES: usize>(&self) -> TermValue<'a, INLINE_BYTES> {
69 TermValue::empty()
70 }
71}
72
73#[derive(Debug, Clone, Copy)]
81pub struct Tensor4Shape<
82 const D0: usize,
83 const D1: usize,
84 const D2: usize,
85 const D3: usize,
86 const ELEM_BYTES: usize,
87>;
88
89impl<
90 const D0: usize,
91 const D1: usize,
92 const D2: usize,
93 const D3: usize,
94 const ELEM_BYTES: usize,
95 > Default for Tensor4Shape<D0, D1, D2, D3, ELEM_BYTES>
96{
97 fn default() -> Self {
98 Self
99 }
100}
101
102impl<
103 const D0: usize,
104 const D1: usize,
105 const D2: usize,
106 const D3: usize,
107 const ELEM_BYTES: usize,
108 > ConstrainedTypeShape for Tensor4Shape<D0, D1, D2, D3, ELEM_BYTES>
109{
110 const IRI: &'static str = "https://uor.foundation/type/ConstrainedType";
111 const SITE_COUNT: usize = D0 * D1 * D2 * D3 * ELEM_BYTES;
112 const CONSTRAINTS: &'static [ConstraintRef] = &[];
113 #[allow(clippy::cast_possible_truncation)]
114 const CYCLE_SIZE: u64 = 256u64.saturating_pow((D0 * D1 * D2 * D3 * ELEM_BYTES) as u32);
115}
116
117impl<
118 const D0: usize,
119 const D1: usize,
120 const D2: usize,
121 const D3: usize,
122 const ELEM_BYTES: usize,
123 > uor_foundation::pipeline::__sdk_seal::Sealed for Tensor4Shape<D0, D1, D2, D3, ELEM_BYTES>
124{
125}
126impl<
127 const D0: usize,
128 const D1: usize,
129 const D2: usize,
130 const D3: usize,
131 const ELEM_BYTES: usize,
132 > GroundedShape for Tensor4Shape<D0, D1, D2, D3, ELEM_BYTES>
133{
134}
135impl<
136 'a,
137 const D0: usize,
138 const D1: usize,
139 const D2: usize,
140 const D3: usize,
141 const ELEM_BYTES: usize,
142 > IntoBindingValue<'a> for Tensor4Shape<D0, D1, D2, D3, ELEM_BYTES>
143{
144 fn as_binding_value<const INLINE_BYTES: usize>(&self) -> TermValue<'a, INLINE_BYTES> {
145 TermValue::empty()
146 }
147}