Skip to main content

burn_backend/tensor/
alias.rs

1use crate::backend::BackendTypes;
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 BackendTypes>::Device;
8
9/// Float element type used by backend.
10pub type FloatElem<B> = <B as BackendTypes>::FloatElem;
11/// Integer element type used by backend.
12pub type IntElem<B> = <B as BackendTypes>::IntElem;
13/// Boolean element type used by backend.
14pub type BoolElem<B> = <B as BackendTypes>::BoolElem;
15
16/// Float tensor primitive type used by the backend.
17pub type FloatTensor<B> = <B as BackendTypes>::FloatTensorPrimitive;
18/// Integer tensor primitive type used by the backend.
19pub type IntTensor<B> = <B as BackendTypes>::IntTensorPrimitive;
20/// Boolean tensor primitive type used by the backend.
21pub type BoolTensor<B> = <B as BackendTypes>::BoolTensorPrimitive;
22/// Quantized tensor primitive type used by the backend.
23pub type QuantizedTensor<B> = <B as BackendTypes>::QuantizedTensorPrimitive;