Go to the documentation of this file.
28 #ifndef __GST_TENSOR_TYPEDEF_H__
29 #define __GST_TENSOR_TYPEDEF_H__
34 #define NNS_TENSOR_RANK_LIMIT (16)
42 #define NNS_TENSOR_SIZE_LIMIT (256)
43 #define NNS_TENSOR_SIZE_LIMIT_STR "256"
52 #define NNS_TENSOR_MEMORY_MAX (16)
57 #define NNS_TENSOR_SIZE_EXTRA_LIMIT (NNS_TENSOR_SIZE_LIMIT - NNS_TENSOR_MEMORY_MAX)
59 #define NNS_MIMETYPE_TENSOR "other/tensor"
60 #define NNS_MIMETYPE_TENSORS "other/tensors"
62 #define GST_TENSOR_NUM_TENSORS_RANGE "(int) [ 1, " NNS_TENSOR_SIZE_LIMIT_STR " ]"
63 #define GST_TENSOR_RATE_RANGE "(fraction) [ 0, max ]"
68 #define GST_TENSOR_TYPE_ALL "{ float16, float32, float64, int64, uint64, int32, uint32, int16, uint16, int8, uint8 }"
73 #define GST_TENSOR_FORMAT_ALL "{ static, flexible, sparse }"
78 #define GST_TENSOR_CAP_DEFAULT \
79 NNS_MIMETYPE_TENSOR ", " \
80 "framerate = " GST_TENSOR_RATE_RANGE
97 #define GST_TENSORS_CAP_MAKE(fmt) \
98 NNS_MIMETYPE_TENSORS ", " \
99 "format = (string) " fmt ", " \
100 "framerate = " GST_TENSOR_RATE_RANGE
107 #define GST_TENSORS_CAP_WITH_NUM(num) \
108 NNS_MIMETYPE_TENSORS ", " \
109 "format = (string) static, num_tensors = " num ", " \
110 "framerate = " GST_TENSOR_RATE_RANGE
115 #define GST_TENSORS_CAP_DEFAULT \
116 GST_TENSORS_CAP_WITH_NUM (GST_TENSOR_NUM_TENSORS_RANGE)
123 #define GST_TENSORS_FLEX_CAP_DEFAULT \
124 GST_TENSORS_CAP_MAKE ("flexible")
131 #define GST_TENSORS_SPARSE_CAP_DEFAULT \
132 GST_TENSORS_CAP_MAKE ("sparse")
158 #if defined(FLOAT16_SUPPORT)
159 #if defined(__aarch64__) || defined(__arm__)
161 typedef __fp16 float16;
162 #elif defined(__x86_64) || defined(__i686__)
164 typedef _Float16 float16;
166 #error "Float 16 supported only with aarch64, arm, x86/64. In arm, you need -mfp16-format=ieee"
242 #ifdef FLOAT16_SUPPORT
Internal data structure for tensor info.
#define NNS_TENSOR_MEMORY_MAX
This value, 16, can be checked with gst_buffer_get_max_memory(), which is GST_BUFFER_MEM_MAX in gstre...
uint32_t tensor_dim[NNS_TENSOR_RANK_LIMIT]
Internal meta data exchange format for a other/tensors instance.
The unit of each data tensors. It will be used as an input/output tensor of other/tensors.
Internal data structure for sparse tensor info.
enum _nns_tensor_type tensor_type
Possible data element types of other/tensor.
@ _NNS_TENSOR_FORMAT_FLEXIBLE
enum _tensor_format tensor_format
Data format of tensor stream in the pipeline.
@ _NNS_TENSOR_FORMAT_STATIC
enum _nns_tensor_layout tensor_layout
Tensor layout format for other/tensor.
_nns_tensor_type
Possible data element types of other/tensor.
@ _NNS_TENSOR_FORMAT_SPARSE
Internal data structure for configured tensors info (for other/tensors).
_tensor_format
Data format of tensor stream in the pipeline.
enum _nns_media_type media_type
Float16 compiler extension support.
_nns_media_type
Float16 compiler extension support.
To make the code simple with all the types. "C++ Template"-like.
_nns_tensor_layout
Tensor layout format for other/tensor.
#define NNS_TENSOR_RANK_LIMIT