burn_backend/tensor/alias.rs
1use crate::backend::Backend;
2
3// We provide some type aliases to improve the readability of using associated types without
4// having to use the disambiguation syntax.
5
6/// Device type used by the backend.
7pub type Device<B> = <B as Backend>::Device;
8
9/// Float element type used by backend.
10pub type FloatElem<B> = <B as Backend>::FloatElem;
11/// Integer element type used by backend.
12pub type IntElem<B> = <B as Backend>::IntElem;
13/// Boolean element type used by backend.
14pub type BoolElem<B> = <B as Backend>::BoolElem;
15
16/// Float tensor primitive type used by the backend.
17pub type FloatTensor<B> = <B as Backend>::FloatTensorPrimitive;
18/// Integer tensor primitive type used by the backend.
19pub type IntTensor<B> = <B as Backend>::IntTensorPrimitive;
20/// Boolean tensor primitive type used by the backend.
21pub type BoolTensor<B> = <B as Backend>::BoolTensorPrimitive;
22/// Quantized tensor primitive type used by the backend.
23pub type QuantizedTensor<B> = <B as Backend>::QuantizedTensorPrimitive;