History

dnn_backend_native_layer_conv2d.c: correct struct name with CamelCase

Guo, Yejun committed 5 years ago

Commit a76fa0c1 parent d4f40c11 file · +9 −9Browse files

Unified · Split

libavfilter/dnn/dnn_backend_native_layer_conv2d.c+9−9
@@ -26,19 +26,19 @@ · 25 unmodified lines
26#define CLAMP_TO_EDGE(x, w) ((x) < 0 ? 0 : ((x) >= (w) ? (w - 1) : (x)))26#define CLAMP_TO_EDGE(x, w) ((x) < 0 ? 0 : ((x) >= (w) ? (w - 1) : (x)))
27 27
28//struct to pass parameters28//struct to pass parameters
29typedef struct thread_common_param{29typedef struct ThreadCommonParam{
30 DnnOperand *operands;30 DnnOperand *operands;
31 const int32_t *input_operand_indexes;31 const int32_t *input_operand_indexes;
32 int32_t output_operand_index;32 int32_t output_operand_index;
33 const void *parameters;33 const void *parameters;
34 NativeContext *ctx;34 NativeContext *ctx;
35 float *output_data;35 float *output_data;
36} thread_common_param;36} ThreadCommonParam;
37 37
38typedef struct thread_param{38typedef struct ThreadParam{
39 thread_common_param *thread_common_param;39 ThreadCommonParam *thread_common_param;
40 int thread_start, thread_end;40 int thread_start, thread_end;
41} thread_param;41} ThreadParam;
42 42
43int dnn_load_layer_conv2d(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)43int dnn_load_layer_conv2d(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
44{44{
@@ -108,8 +108,8 @@ int dnn_load_layer_conv2d(Layer *layer, AVIOContext *model_file_context, int fil · 63 unmodified lines
108static void * dnn_execute_layer_conv2d_thread(void *threadarg)108static void * dnn_execute_layer_conv2d_thread(void *threadarg)
109{109{
110 //pass parameters110 //pass parameters
111 thread_param *thread_param = (struct thread_param *)threadarg;111 ThreadParam *thread_param = threadarg;
112 thread_common_param *thread_common_param = thread_param->thread_common_param;112 ThreadCommonParam *thread_common_param = thread_param->thread_common_param;
113 DnnOperand *operands = thread_common_param->operands;113 DnnOperand *operands = thread_common_param->operands;
114 int32_t input_operand_index = thread_common_param->input_operand_indexes[0];114 int32_t input_operand_index = thread_common_param->input_operand_indexes[0];
115 int height = operands[input_operand_index].dims[1];115 int height = operands[input_operand_index].dims[1];
@@ -190,8 +190,8 @@ int dnn_execute_layer_conv2d(DnnOperand *operands, const int32_t *input_operand_ · 74 unmodified lines
190 pthread_t *thread_id = av_malloc(thread_num * sizeof(pthread_t));190 pthread_t *thread_id = av_malloc(thread_num * sizeof(pthread_t));
191 int thread_stride;191 int thread_stride;
192#endif192#endif
193 thread_param **thread_param = av_malloc(thread_num * sizeof(*thread_param));193 ThreadParam **thread_param = av_malloc(thread_num * sizeof(*thread_param));
194 thread_common_param thread_common_param;194 ThreadCommonParam thread_common_param;
195 const ConvolutionalParams *conv_params = (const ConvolutionalParams *)(parameters);195 const ConvolutionalParams *conv_params = (const ConvolutionalParams *)(parameters);
196 int height = operands[input_operand_indexes[0]].dims[1];196 int height = operands[input_operand_indexes[0]].dims[1];
197 int width = operands[input_operand_indexes[0]].dims[2];197 int width = operands[input_operand_indexes[0]].dims[2];

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t