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
//! VeScalar trait for Vector Engine scalar types.
use Any;
use crateMaterializableScalar;
/// The kind of scalar type supported by Vector Engine.
/// Marker trait for scalar types supported by Vector Engine.
/// Only i32 and f32 are supported.
///
/// This trait is sealed and cannot be implemented outside this module. `MaterializableScalar` is a
/// supertrait, not just incidentally true of the two real impls: the VE paths already exclude i5/i9
/// separately (per `MaterializableScalar`'s own doc), so declaring it here lets every VE-generic
/// whole-tensor op (`Tensor::map`/`zip_with`/`transmute`, all `MaterializableScalar`-gated) stay
/// callable under a bare `D: VeScalar` bound, with no separate restatement at each call site.