From: 오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 Date: Wed, 27 Nov 2019 01:05:37 +0000 (+0900) Subject: [runtime/api] Update nnfw_tensorinfo (#9224) X-Git-Tag: submit/tizen/20191205.083104~107 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5a67f4826a8bd5a87e60c06e160efedb878c7faf;p=platform%2Fcore%2Fml%2Fnnfw.git [runtime/api] Update nnfw_tensorinfo (#9224) Merge typedef and struct definition Add comment for nnfw_tensorinfo Signed-off-by: Hyeongseok Oh --- diff --git a/runtime/neurun/api/include/nnfw.h b/runtime/neurun/api/include/nnfw.h index f1b8a45..9c80d02 100644 --- a/runtime/neurun/api/include/nnfw.h +++ b/runtime/neurun/api/include/nnfw.h @@ -55,8 +55,6 @@ extern "C" { */ typedef struct nnfw_session nnfw_session; -typedef struct nnfw_tensorinfo nnfw_tensorinfo; - typedef enum { NNFW_TYPE_TENSOR_FLOAT32 = 0, NNFW_TYPE_TENSOR_INT32 = 1, @@ -87,14 +85,22 @@ typedef enum { } NNFW_LAYOUT; /** - * tensor_info + * tensor_info describes the type and shape of tensors + * + *

This structure is used to describe input and output tensors. + * Application can get input and output tensor type and shape described in model by using + * {@link nnfw_input_tensorinfo} and {@link nnfw_output_tensorinfo} + * + *

Maximum rank is 6. And tensor's dimension value is filled in 'dims' field from index 0. + * For example, if tensor's rank is 4, + * application can get dimension value from dims[0], dims[1], dims[2], and dims[3] */ -struct nnfw_tensorinfo +typedef struct nnfw_tensorinfo { NNFW_TYPE dtype; int rank; - int dims[6]; // MAX rank is 6 -}; + int dims[6]; +} nnfw_tensorinfo; /* * Create a new session instance