mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
Fix typo.
This commit is contained in:
parent
889c606f8f
commit
478a9f53be
@ -75,16 +75,16 @@ large enough to hold all the data.
|
||||
|
||||
// Map a tensor of ints on top of stack-allocated storage.
|
||||
int storage[128]; // 2 x 4 x 2 x 8 = 128
|
||||
TensorMap<int, 4> t_4d(storage, 2, 4, 2, 8);
|
||||
TensorMap<Tensor<int, 4>> t_4d(storage, 2, 4, 2, 8);
|
||||
|
||||
// The same storage can be viewed as a different tensor.
|
||||
// You can also pass the sizes as an array.
|
||||
TensorMap<int, 2> t_2d(storage, 16, 8);
|
||||
TensorMap<Tensor<int, 2>> t_2d(storage, 16, 8);
|
||||
|
||||
// You can also map fixed-size tensors. Here we get a 1d view of
|
||||
// the 2d fixed-size tensor.
|
||||
Tensor<float, Sizes<4, 5>> t_4x3;
|
||||
TensorMap<float, 1> t_12(t_4x3, 12);
|
||||
TensorMap<Tensor<float, 1>> t_12(t_4x3, 12);
|
||||
|
||||
|
||||
#### Class TensorRef
|
||||
|
Loading…
Reference in New Issue
Block a user