We implemented 0-init dimension in nnstreamer.
If dim value at index of old rank limit (4) is not 0, it is extended.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
static gboolean
gst_info_is_extended (const GstTensorsInfo * gst_info)
{
- int i, j;
+ GstTensorInfo *_info;
+ guint i;
+
for (i = 0; i < gst_info->num_tensors; i++) {
- GstTensorInfo *_gst_tensor_info =
- gst_tensors_info_get_nth_info ((GstTensorsInfo *) gst_info, i);
- for (j = ML_TENSOR_RANK_LIMIT_PREV; j < NNS_TENSOR_RANK_LIMIT; j++) {
- if (_gst_tensor_info->dimension[j] > 1)
- return TRUE;
- }
+ _info = gst_tensors_info_get_nth_info ((GstTensorsInfo *) gst_info, i);
+
+ if (_info->dimension[ML_TENSOR_RANK_LIMIT_PREV] > 0)
+ return TRUE;
}
+
return FALSE;
}