X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=documentation%2F_sub_tensor_info_8h_source.xhtml;h=406b56ba6d9b22e4bd62dc1dbc39fa7823bd79f5;hb=HEAD;hp=696475ffba18b6b673547d33f5d5259cb26e602e;hpb=67c8c91522e5be8156b77f57e63c0253535c902a;p=platform%2Fupstream%2Farmcl.git diff --git a/documentation/_sub_tensor_info_8h_source.xhtml b/documentation/_sub_tensor_info_8h_source.xhtml index 696475f..406b56b 100644 --- a/documentation/_sub_tensor_info_8h_source.xhtml +++ b/documentation/_sub_tensor_info_8h_source.xhtml @@ -40,7 +40,7 @@
Compute Library -  18.03 +  18.05
@@ -117,25 +117,27 @@ $(document).ready(function(){initNavTree('_sub_tensor_info_8h_source.xhtml','');
SubTensorInfo.h
-Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2018 ARM Limited.
3  *
4  * SPDX-License-Identifier: MIT
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to
8  * deal in the Software without restriction, including without limitation the
9  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10  * sell copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all
14  * copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  * SOFTWARE.
23  */
24 #ifndef __ARM_COMPUTE_SUBTENSORINFO_H__
25 #define __ARM_COMPUTE_SUBTENSORINFO_H__
26 
28 
35 
36 #include <cstddef>
37 #include <memory>
38 
39 namespace arm_compute
40 {
42 class SubTensorInfo final : public ITensorInfo
43 {
44 public:
46  SubTensorInfo();
55  SubTensorInfo(ITensorInfo *parent, TensorShape tensor_shape, Coordinates coords, bool extend_parent = false);
57  ~SubTensorInfo() = default;
59  SubTensorInfo(const SubTensorInfo &) = default;
61  SubTensorInfo &operator=(const SubTensorInfo &) = default;
63  SubTensorInfo(SubTensorInfo &&) = default;
65  SubTensorInfo &operator=(SubTensorInfo &&) = default;
71  {
72  return _coords;
73  }
74 
75  // Inherited methods overridden:
76  std::unique_ptr<ITensorInfo> clone() const override;
78  {
79  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
80  _parent->set_data_type(data_type);
81  return *this;
82  };
84  {
85  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
86  _parent->set_num_channels(num_channels);
87  return *this;
88  };
90  {
91  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
92  _parent->set_format(format);
93  return *this;
94  };
96  {
97  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
98  _parent->set_fixed_point_position(fixed_point_position);
99  return *this;
100  };
101  ITensorInfo &set_tensor_shape(const TensorShape &shape) override;
103  {
104  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
105  _parent->set_quantization_info(quantization_info);
106  return *this;
107  }
109  {
110  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
111  _parent->reset_padding();
112  return *this;
113  }
114  bool auto_padding() override
115  {
116  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
117  return _parent->auto_padding();
118  };
119  bool extend_padding(const PaddingSize &padding) override;
120  size_t dimension(size_t index) const override
121  {
122  return _tensor_shape[index];
123  }
124  const Strides &strides_in_bytes() const override
125  {
126  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
127  return _parent->strides_in_bytes();
128  }
129  size_t offset_first_element_in_bytes() const override
130  {
131  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
132  return _parent->offset_element_in_bytes(_coords);
133  }
134  size_t offset_element_in_bytes(const Coordinates &pos) const override;
135  int fixed_point_position() const override
136  {
137  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
138  return _parent->fixed_point_position();
139  }
140  size_t element_size() const override
141  {
142  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
143  return _parent->element_size();
144  }
145  size_t num_dimensions() const override
146  {
147  return _tensor_shape.num_dimensions();
148  }
149  size_t num_channels() const override
150  {
151  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
152  return _parent->num_channels();
153  }
154  const TensorShape &tensor_shape() const override
155  {
156  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
157  return _tensor_shape;
158  }
159  DataType data_type() const override
160  {
161  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
162  return _parent->data_type();
163  }
164  Format format() const override
165  {
166  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
167  return _parent->format();
168  }
169  size_t total_size() const override
170  {
171  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
172  return _parent->total_size();
173  }
174  PaddingSize padding() const override
175  {
176  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
177  return _parent->padding();
178  }
179  bool has_padding() const override
180  {
181  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
182  return _parent->has_padding();
183  }
184  bool is_resizable() const override
185  {
186  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
187  return _parent->is_resizable();
188  }
190  {
191  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
192  _parent->set_is_resizable(is_resizable);
193  return *this;
194  }
195  ValidRegion valid_region() const override
196  {
197  return _valid_region;
198  }
200  {
201  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
202  // Check if subtensor is valid if parent is configured
203  if(_parent->tensor_shape().total_size() != 0)
204  {
206  }
207  _valid_region = valid_region;
208  }
210  {
211  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
212  return _parent->quantization_info();
213  }
214 
215 private:
216  ITensorInfo *_parent;
217  TensorShape _tensor_shape;
218  Coordinates _coords;
219  ValidRegion _valid_region;
220  bool _extend_parent;
221 };
222 }
223 #endif /*__ARM_COMPUTE_SUBTENSORINFO_H__ */
size_t element_size() const override
Element size in bytes calculated as data_size() * num_channels()
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2018 ARM Limited.
3  *
4  * SPDX-License-Identifier: MIT
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to
8  * deal in the Software without restriction, including without limitation the
9  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10  * sell copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all
14  * copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  * SOFTWARE.
23  */
24 #ifndef __ARM_COMPUTE_SUBTENSORINFO_H__
25 #define __ARM_COMPUTE_SUBTENSORINFO_H__
26 
28 
35 
36 #include <cstddef>
37 #include <memory>
38 
39 namespace arm_compute
40 {
42 class SubTensorInfo final : public ITensorInfo
43 {
44 public:
46  SubTensorInfo();
55  SubTensorInfo(ITensorInfo *parent, TensorShape tensor_shape, Coordinates coords, bool extend_parent = false);
57  ~SubTensorInfo() = default;
59  SubTensorInfo(const SubTensorInfo &) = default;
61  SubTensorInfo &operator=(const SubTensorInfo &) = default;
63  SubTensorInfo(SubTensorInfo &&) = default;
65  SubTensorInfo &operator=(SubTensorInfo &&) = default;
71  {
72  return _coords;
73  }
74 
75  // Inherited methods overridden:
76  std::unique_ptr<ITensorInfo> clone() const override;
78  {
79  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
80  _parent->set_data_type(data_type);
81  return *this;
82  };
84  {
85  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
86  _parent->set_data_layout(data_layout);
87  return *this;
88  };
90  {
91  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
92  _parent->set_num_channels(num_channels);
93  return *this;
94  };
96  {
97  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
98  _parent->set_format(format);
99  return *this;
100  };
102  {
103  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
104  _parent->set_fixed_point_position(fixed_point_position);
105  return *this;
106  };
107  ITensorInfo &set_tensor_shape(const TensorShape &shape) override;
109  {
110  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
111  _parent->set_quantization_info(quantization_info);
112  return *this;
113  }
115  {
116  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
117  _parent->reset_padding();
118  return *this;
119  }
120  bool auto_padding() override
121  {
122  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
123  return _parent->auto_padding();
124  };
125  bool extend_padding(const PaddingSize &padding) override;
126  size_t dimension(size_t index) const override
127  {
128  return _tensor_shape[index];
129  }
130  size_t dimension(DataLayoutDimension dimension) const override
131  {
132  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
134  }
135  const Strides &strides_in_bytes() const override
136  {
137  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
138  return _parent->strides_in_bytes();
139  }
140  size_t offset_first_element_in_bytes() const override
141  {
142  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
143  return _parent->offset_element_in_bytes(_coords);
144  }
145  size_t offset_element_in_bytes(const Coordinates &pos) const override;
146  int fixed_point_position() const override
147  {
148  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
149  return _parent->fixed_point_position();
150  }
151  size_t element_size() const override
152  {
153  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
154  return _parent->element_size();
155  }
156  size_t num_dimensions() const override
157  {
158  return _tensor_shape.num_dimensions();
159  }
160  size_t num_channels() const override
161  {
162  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
163  return _parent->num_channels();
164  }
165  const TensorShape &tensor_shape() const override
166  {
167  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
168  return _tensor_shape;
169  }
170  DataType data_type() const override
171  {
172  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
173  return _parent->data_type();
174  }
175  Format format() const override
176  {
177  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
178  return _parent->format();
179  }
180  size_t total_size() const override
181  {
182  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
183  return _parent->total_size();
184  }
185  PaddingSize padding() const override
186  {
187  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
188  return _parent->padding();
189  }
190  bool has_padding() const override
191  {
192  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
193  return _parent->has_padding();
194  }
195  bool is_resizable() const override
196  {
197  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
198  return _parent->is_resizable();
199  }
201  {
202  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
203  _parent->set_is_resizable(is_resizable);
204  return *this;
205  }
206  ValidRegion valid_region() const override
207  {
208  return _valid_region;
209  }
211  {
212  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
213  // Check if subtensor is valid if parent is configured
214  if(_parent->tensor_shape().total_size() != 0)
215  {
217  }
218  _valid_region = valid_region;
219  }
221  {
222  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
223  return _parent->quantization_info();
224  }
225  DataLayout data_layout() const override
226  {
227  ARM_COMPUTE_ERROR_ON(_parent == nullptr);
228  return _parent->data_layout();
229  }
230 
231 private:
232  ITensorInfo *_parent;
233  TensorShape _tensor_shape;
234  Coordinates _coords;
235  ValidRegion _valid_region;
236  bool _extend_parent;
237 };
238 }
239 #endif /*__ARM_COMPUTE_SUBTENSORINFO_H__ */
size_t element_size() const override
Element size in bytes calculated as data_size() * num_channels()
virtual ITensorInfo & set_num_channels(int num_channels)=0
Set the number of channels to the specified value.
size_t offset_element_in_bytes(const Coordinates &pos) const override
The offset in bytes from the beginning of the memory allocation to access the element at position (x...
-
size_t total_size() const override
Returns the total size of the tensor in bytes.
+
size_t total_size() const override
Returns the total size of the tensor in bytes.
Shape of a tensor.
Definition: TensorShape.h:39
-
ITensorInfo & set_is_resizable(bool is_resizable) override
Set the flag whether the tensor size can be changed.
+
ITensorInfo & set_is_resizable(bool is_resizable) override
Set the flag whether the tensor size can be changed.
bool extend_padding(const PaddingSize &padding) override
Update the offset to the first element, the strides and the total size.
-
Container for 2D border size.
Definition: Types.h:229
+
Container for 2D border size.
Definition: Types.h:291
virtual ITensorInfo & set_fixed_point_position(int fixed_point_position)=0
Set the fixed point position to the specified value.
-
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:306
+
DataLayoutDimension
Supported tensor data layout dimensions.
Definition: Types.h:118
virtual DataType data_type() const =0
Data type used for each element of the tensor.
-
QuantizationInfo quantization_info() const override
Get the quantization settings (scale and offset) of the tensor.
+
QuantizationInfo quantization_info() const override
Get the quantization settings (scale and offset) of the tensor.
+
DataLayout data_layout() const override
Get the data layout of the tensor.
virtual size_t offset_element_in_bytes(const Coordinates &pos) const =0
The offset in bytes from the beginning of the memory allocation to access the element at position (x...
+
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:328
ITensorInfo & set_tensor_shape(const TensorShape &shape) override
Set the shape of an already initialized tensor.
Store the tensor&#39;s metadata.
Definition: ITensorInfo.h:40
-
int fixed_point_position() const override
Fixed point position used when the tensor data type is QS8 or QS16.
-
ITensorInfo & set_format(Format format) override
Set the format of an already initialized tensor.
Definition: SubTensorInfo.h:89
-
const Strides & strides_in_bytes() const override
The strides in bytes for accessing each dimension of the tensor.
+
int fixed_point_position() const override
Fixed point position used when the tensor data type is QS8 or QS16.
+
ITensorInfo & set_format(Format format) override
Set the format of an already initialized tensor.
Definition: SubTensorInfo.h:95
+
const Strides & strides_in_bytes() const override
The strides in bytes for accessing each dimension of the tensor.
virtual ITensorInfo & reset_padding()=0
Resets the padding settings of the tensor.
Store the sub tensor&#39;s metadata.
Definition: SubTensorInfo.h:42
@@ -143,65 +145,71 @@ $(document).ready(function(){initNavTree('_sub_tensor_info_8h_source.xhtml','');
virtual ValidRegion valid_region() const =0
Valid region of the tensor.
SubTensorInfo & operator=(const SubTensorInfo &)=default
Allow instances of this class to be copied.
virtual bool is_resizable() const =0
Flag indicating whether the size of the tensor can be changed.
-
size_t offset_first_element_in_bytes() const override
The offset from the beginning of the memory allocation to the first element of the tensor...
+
size_t offset_first_element_in_bytes() const override
The offset from the beginning of the memory allocation to the first element of the tensor...
virtual Format format() const =0
Colour format of the image.
Coordinates coords() const
Returns the coordinates of the sub-tensor inside the parent tensor.
Definition: SubTensorInfo.h:70
-
bool auto_padding() override
Update the offset to the first element and the strides to automatically computed values.
-
ITensorInfo & set_fixed_point_position(int fixed_point_position) override
Set the fixed point position to the specified value.
Definition: SubTensorInfo.h:95
-
PaddingSize padding() const override
Padding of tensor.
+
bool auto_padding() override
Update the offset to the first element and the strides to automatically computed values.
+
ITensorInfo & set_fixed_point_position(int fixed_point_position) override
Set the fixed point position to the specified value.
+
PaddingSize padding() const override
Padding of tensor.
virtual bool auto_padding()=0
Update the offset to the first element and the strides to automatically computed values.
std::unique_ptr< ITensorInfo > clone() const override
Provide a clone of the current object of class T.
-
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBTENSOR_VALID_REGION(pv, sv)
Definition: Validate.h:835
+
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBTENSOR_VALID_REGION(pv, sv)
Definition: Validate.h:938
virtual const TensorShape & tensor_shape() const =0
Size for each dimension of the tensor.
+
virtual ITensorInfo & set_data_layout(const DataLayout &data_layout)=0
Set the data layout of the tensor.
Format
Image colour formats.
Definition: Types.h:50
-
ValidRegion valid_region() const override
Valid region of the tensor.
+
ValidRegion valid_region() const override
Valid region of the tensor.
virtual int fixed_point_position() const =0
Fixed point position used when the tensor data type is QS8 or QS16.
Coordinates of an item.
Definition: Coordinates.h:37
~SubTensorInfo()=default
Default destructor.
-
Format format() const override
Colour format of the image.
-
const TensorShape & tensor_shape() const override
Size for each dimension of the tensor.
+
Format format() const override
Colour format of the image.
+
const TensorShape & tensor_shape() const override
Size for each dimension of the tensor.
virtual size_t element_size() const =0
Element size in bytes calculated as data_size() * num_channels()
virtual PaddingSize padding() const =0
Padding of tensor.
virtual ITensorInfo & set_quantization_info(const QuantizationInfo &quantization_info)=0
Set the quantization settings (scale and offset) of the tensor.
-
ITensorInfo & reset_padding() override
Resets the padding settings of the tensor.
+
ITensorInfo & reset_padding() override
Resets the padding settings of the tensor.
virtual ITensorInfo & set_data_type(DataType data_type)=0
Set the data type to the specified value.
virtual QuantizationInfo quantization_info() const =0
Get the quantization settings (scale and offset) of the tensor.
Strides of an item in bytes.
Definition: Strides.h:37
virtual size_t total_size() const =0
Returns the total size of the tensor in bytes.
+
size_t dimension(DataLayoutDimension dimension) const override
Return the size of the requested data layout dimension.
SubTensorInfo()
Default constructor.
unsigned int num_dimensions() const
Returns the effective dimensionality of the tensor.
Definition: Dimensions.h:122
-
size_t num_dimensions() const override
The number of dimensions of the tensor (rank)
-
DataType data_type() const override
Data type used for each element of the tensor.
-
bool is_resizable() const override
Flag indicating whether the size of the tensor can be changed.
-
size_t num_channels() const override
The number of channels for each tensor element.
-
bool has_padding() const override
Checks if the tensor has been allocated with padding or not.
-
size_t total_size() const
Collapses all dimensions to a single linear total size.
Definition: TensorShape.h:153
+
size_t num_dimensions() const override
The number of dimensions of the tensor (rank)
+
DataType data_type() const override
Data type used for each element of the tensor.
+
bool is_resizable() const override
Flag indicating whether the size of the tensor can be changed.
+
size_t num_channels() const override
The number of channels for each tensor element.
+
bool has_padding() const override
Checks if the tensor has been allocated with padding or not.
+
size_t total_size() const
Collapses all dimensions to a single linear total size.
Definition: TensorShape.h:157
-
Quantization settings (used for QASYMM8 data type)
Definition: Types.h:117
+
Quantization settings (used for QASYMM8 data type)
Definition: Types.h:127
virtual const Strides & strides_in_bytes() const =0
The strides in bytes for accessing each dimension of the tensor.
- +
Container for valid region of a window.
Definition: Types.h:206
+
size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)
Get the index of the given dimension.
Definition: Helpers.inl:340
virtual ITensorInfo & set_format(Format format)=0
Set the format of an already initialized tensor.
-
ITensorInfo & set_quantization_info(const QuantizationInfo &quantization_info) override
Set the quantization settings (scale and offset) of the tensor.
+
ITensorInfo & set_quantization_info(const QuantizationInfo &quantization_info) override
Set the quantization settings (scale and offset) of the tensor.
DataType
Available data types.
Definition: Types.h:72
-
void set_valid_region(const ValidRegion &valid_region) override
Set the valid region of the tensor.
-
ITensorInfo & set_num_channels(int num_channels) override
Set the number of channels to the specified value.
Definition: SubTensorInfo.h:83
+
void set_valid_region(const ValidRegion &valid_region) override
Set the valid region of the tensor.
+
DataLayout
Supported tensor data layouts.
Definition: Types.h:110
+
ITensorInfo & set_num_channels(int num_channels) override
Set the number of channels to the specified value.
Definition: SubTensorInfo.h:89
virtual size_t num_channels() const =0
The number of channels for each tensor element.
ITensorInfo & set_data_type(DataType data_type) override
Set the data type to the specified value.
Definition: SubTensorInfo.h:77
virtual bool has_padding() const =0
Checks if the tensor has been allocated with padding or not.
+
ITensorInfo & set_data_layout(const DataLayout &data_layout) override
Set the data layout of the tensor.
Definition: SubTensorInfo.h:83
virtual ITensorInfo & set_is_resizable(bool is_resizable)=0
Set the flag whether the tensor size can be changed.
-
size_t dimension(size_t index) const override
Return the size of the requested dimension.
+
size_t dimension(size_t index) const override
Return the size of the requested dimension.
+
virtual DataLayout data_layout() const =0
Get the data layout of the tensor.