kornia_core/
lib.rs

1#![deny(missing_docs)]
2//! Core module containing the tensor and storage implementations.
3
4/// allocator module containing the memory management utilities.
5pub mod allocator;
6
7/// tensor module containing the tensor and storage implementations.
8pub mod tensor;
9
10/// serde module containing the serialization and deserialization utilities.
11pub mod serde;
12
13/// storage module containing the storage implementations.
14pub mod storage;
15
16/// view module containing the view implementations.
17pub mod view;
18
19pub use crate::allocator::{CpuAllocator, TensorAllocator};
20pub(crate) use crate::tensor::get_strides_from_shape;
21pub use crate::tensor::{Tensor, TensorError};
22
23/// Type alias for a 1-dimensional tensor.
24pub type Tensor1<T, A> = Tensor<T, 1, A>;
25
26/// Type alias for a 2-dimensional tensor.
27pub type Tensor2<T, A> = Tensor<T, 2, A>;
28
29/// Type alias for a 3-dimensional tensor.
30pub type Tensor3<T, A> = Tensor<T, 3, A>;
31
32/// Type alias for a 4-dimensional tensor.
33pub type Tensor4<T, A> = Tensor<T, 4, A>;
34
35/// Type alias for a 2-dimensional tensor with CPU allocator.
36pub type CpuTensor2<T> = Tensor2<T, CpuAllocator>;