repo stringlengths 1 152 ⌀ | file stringlengths 14 221 | code stringlengths 501 25k | file_length int64 501 25k | avg_line_length float64 20 99.5 | max_line_length int64 21 134 | extension_type stringclasses 2
values |
|---|---|---|---|---|---|---|
Tengine | Tengine-master/executor/operator/ref/kernel/mvn/ref_mvn_fp32.c | #include <stdio.h>
int ref_mvn_fp32(float* in_data, float* out_data, const ref_mvn_param* param)
{
int batch_num = param->input_n;
int in_h = param->input_h;
int in_w = param->input_w;
int in_c = param->input_c;
int in_size = in_h * in_w;
int image_size = in_size * in_c;
int offset = 0;
... | 4,410 | 30.06338 | 77 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/relu/ref_relu_fp32.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,376 | 30.295455 | 111 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/relu/ref_relu_fp16.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,887 | 28.968254 | 113 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/relu/ref_relu_int8.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,337 | 30.116279 | 113 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/relu/ref_relu_uint8.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,386 | 29.152174 | 116 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/relu/ref_relu_kernel.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,544 | 23.52381 | 118 | h |
Tengine | Tengine-master/executor/operator/ref/kernel/rpn/ref_rpn_fp16.c | #include "ref_rpn_kernel.h"
static inline void bbox_tranform_inv_fp16(__fp16* m_box, float* local_anchors, struct rpn_param* param)
{
int feat_size = param->feat_height * param->feat_width;
int c_4 = param->feat_chan / 4;
for(int i = 0; i < c_4; ++i)
{
for(int j = 0; j < (2 * feat_size); ++j)
... | 4,494 | 37.75 | 111 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/rpn/ref_rpn_fp32.c | #include "ref_rpn_kernel.h"
int ref_rpn_fp32(const float* score, float* featmap, float* anchors, float* output, struct rpn_param* param)
{
if(score == nullptr || featmap == nullptr || anchors == nullptr || output == nullptr)
return false;
int featmap_size = param->feat_height * param->feat_width * para... | 1,275 | 28.674419 | 108 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/rpn/ref_rpn_kernel.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 7,232 | 30.311688 | 120 | h |
Tengine | Tengine-master/executor/operator/ref/kernel/rpn/ref_rpn_int8.c |
int ref_dpp_uint8(const uint8_t* input, const uint8_t* score, const uint8_t* anchor, float* detect_num,
float* detect_class, float* detect_score, float* detect_boxes, dpp_param* param)
{
const int num_classes = param->num_classes + 1;
const int num_boxes = param->num_boxes;
/* transform ... | 1,134 | 38.137931 | 108 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/matmul/ref_matmul_kernel.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,328 | 22.732143 | 109 | h |
Tengine | Tengine-master/executor/operator/ref/kernel/matmul/ref_matmul_fp32.c | static int ref_matmul_fp32(const float* input0, float* input1,float* output, matmul_data* param)
{
int batch = param->batch;
int c = param->c;
int h = param->h;
int w = param->w;
int k = param->k;
for(int n = 0; n < batch; ++n)
{
for(int in_c = 0; in_c < c; in_c++)
{
... | 1,021 | 28.2 | 96 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/sparsetodense/ref_sparsetodense_fp32.c | static int ref_sparsetodense_fp32(int* input, int* outout_shape, int* sparse_values, float* output, sparsetodense_param* param)
{
int output_dim_size = param -> output_dim_size;
int indices_dim_size = param -> indices_dim_size;
int sparse_value_size = param -> sparse_values_size;
float default_value = p... | 2,346 | 23.705263 | 127 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/relu6/ref_relu6_uint8.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,195 | 33.171429 | 73 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/relu6/ref_relu6_kernel.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,510 | 23.770492 | 78 | h |
Tengine | Tengine-master/executor/operator/ref/kernel/relu6/ref_relu6_fp16.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,290 | 29.023256 | 86 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/relu6/ref_relu6_int8.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,165 | 32.314286 | 71 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/relu6/ref_relu6_fp32.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,069 | 31.424242 | 70 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/deconvolution/ref_deconv_fp32.c | static int ref_deconv_fp32(const float* input, float* output, const float* kernel, const float* bias,
const deconv_ref_param* param)
{
int batch = param->batch;
int group = param->group;
int input_c = param->in_shape[0] / group;
int input_h = param->in_shape[1];
int input_... | 5,985 | 42.064748 | 120 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/deconvolution/ref_deconv_int8.c | static int ref_deconv_int8(const int8_t* input, int8_t* output, const int8_t* kernel, const float* bias,
deconv_ref_param* param)
{
int batch = param->batch;
int group = param->group;
int input_c = param->in_shape[0] / group;
int input_h = param->in_shape[1];
int input_w =... | 6,981 | 38.005587 | 120 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/deconvolution/ref_deconv_kernel.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 2,168 | 22.576087 | 105 | h |
Tengine | Tengine-master/executor/operator/ref/kernel/deconvolution/ref_deconv_uint8.c | static int ref_deconv_uint8(const uint8_t* input, uint8_t* output, const uint8_t* kernel, const int* bias,
const deconv_ref_param* param)
{
int batch = param->batch;
int group = param->group;
int input_c = param->in_shape[0] / group;
int input_h = param->in_shape[1];
int ... | 6,957 | 39.929412 | 120 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/deconvolution/ref_deconv_fp16.c | static inline void activation_fp16(__fp16* input, int activation)
{
#if !defined(__ARM_ARCH) || __ARM_ARCH < 8
float tmp = fp16_to_fp32(*input);
#else
__fp16 tmp = *input;
#endif
if(activation >= 0)
{
if(tmp < 0)
tmp = 0;
if(activation == 1 && tmp > 1)
tmp = 1;
... | 7,144 | 39.596591 | 120 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/concat/ref_concat_fp16.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 2,002 | 28.895522 | 114 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/concat/ref_concat_kernel.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,706 | 20.884615 | 100 | h |
Tengine | Tengine-master/executor/operator/ref/kernel/concat/ref_concat_uint8.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 2,789 | 30.348315 | 114 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/concat/ref_concat_fp32.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,998 | 28.835821 | 114 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/concat/ref_concat_int8.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 2,853 | 28.122449 | 114 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/maximum/ref_maximum_fp16.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,143 | 31.685714 | 107 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/maximum/ref_maximum_int8.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,116 | 32.848485 | 107 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/maximum/ref_maximum_fp32.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,113 | 32.757576 | 104 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/maximum/ref_maximum_uint8.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,117 | 32.878788 | 108 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/maximum/ref_maximum_kernel.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,659 | 23.057971 | 110 | h |
Tengine | Tengine-master/executor/operator/ref/kernel/normalize/ref_normalize_int8.c | static int ref_normalize_int8(int8_t* input, int8_t* output, int8_t* scale, ref_normalize_param* param)
{
int batch_num = param->input_n;
int in_h = param->input_h;
int in_w = param->input_w;
int in_c = param->input_c;
int in_offset = 0;
int out_offset = 0;
int out_size = batch_num * in_h *... | 3,179 | 33.193548 | 103 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/normalize/ref_normalize_fp16.c |
static int ref_normalize_fp16(__fp16* input, __fp16* output, __fp16* scale, const ref_normalize_param* param)
{
int batch_num = param->input_n;
int in_h = param->input_h;
int in_w = param->input_w;
int in_c = param->input_c;
int in_offset = 0;
int out_offset = 0;
float* buff = ( float* )ma... | 2,971 | 30.956989 | 109 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/normalize/ref_normalize_uint8.c |
static int ref_normalize_uint8(uint8_t* input, uint8_t* output, uint8_t* scale, const ref_normalize_param* param)
{
int batch_num = param->input_n;
int in_h = param->input_h;
int in_w = param->input_w;
int in_c = param->input_c;
int in_offset = 0;
int out_offset = 0;
float* buff = ( float*... | 2,787 | 33.419753 | 113 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/normalize/ref_normalize_fp32.c |
static int ref_normalize_fp32(float* input, float* output, float* scale, const ref_normalize_param* param)
{
int batch_num = param->input_n;
int in_h = param->input_h;
int in_w = param->input_w;
int in_c = param->input_c;
int in_offset = 0;
int out_offset = 0;
float* buff = ( float* )mallo... | 2,378 | 31.148649 | 106 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/normalize/ref_normalize_kernel.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,754 | 21.792208 | 112 | h |
Tengine | Tengine-master/executor/operator/ref/kernel/logistic/ref_logistic_fp16.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,191 | 28.8 | 77 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/logistic/ref_logistic_int8.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,203 | 29.1 | 89 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/logistic/ref_logistic_fp32.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,160 | 28.025 | 68 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/logistic/ref_logistic_kernel.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,546 | 22.089552 | 83 | h |
Tengine | Tengine-master/executor/operator/ref/kernel/reorg/ref_reorg_kernel.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 2,544 | 24.19802 | 113 | h |
Tengine | Tengine-master/executor/operator/ref/kernel/reorg/ref_reorg_int8.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,071 | 35.965517 | 94 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/reorg/ref_reorg_fp32.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,068 | 35.862069 | 93 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/reorg/ref_reorg_uint8.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,075 | 36.103448 | 95 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/reorg/ref_reorg_fp16.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,071 | 35.965517 | 94 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/add_n/ref_addn_uint8.c | static int ref_addn_uint8(uint8_t** input, uint8_t* output, const ref_addn_param* param)
{
int input_size = param->input_size;
int in_num = param->in_num;
float* out_f32 = ( float* )malloc(input_size);
memset(out_f32, 0, input_size);
for(int i = 0; i < in_num; ++i)
{
uint8_t* input_data ... | 881 | 27.451613 | 88 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/add_n/ref_addn_kernel.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,573 | 21.485714 | 97 | h |
Tengine | Tengine-master/executor/operator/ref/kernel/add_n/ref_addn_int8.c | static int ref_addn_int8(int8_t** input, int8_t* output, ref_addn_param* param)
{
int input_size = param->input_size;
int in_num = param->in_num;
float* out_f32 = ( float* )malloc(input_size * sizeof(float));
memset(out_f32, 0x0, input_size);
for(int i = 0; i < in_num; ++i)
{
int8_t* in... | 1,050 | 26.657895 | 79 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/add_n/ref_addn_fp16.c | static int ref_addn_fp16(__fp16** input, __fp16* output, const ref_addn_param* param)
{
int input_size = (param->input_size / sizeof(__fp16));
int in_num = param->in_num;
#if !defined(__ARM_ARCH) || __ARM_ARCH < 8
float* buff = ( float* )malloc(input_size);
for(int i = 0; i < in_num; ++i)
{
... | 837 | 22.942857 | 85 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/pad/ref_pad_kernel.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,927 | 20.186813 | 71 | h |
Tengine | Tengine-master/executor/operator/ref/kernel/pad/ref_pad_uint8.c | static int ref_pad_uint8(uint8_t* data, uint8_t* out_data, pad_param* param)
{
if(param->mode == 0)
{
// support pad on h,w dim only
if(param->pad_0_h == 0 && param->pad_0_w == 0 && param->pad_3_h == 0 && param->pad_3_w == 0)
{
for(int n = 0; n < param->in_n; ++n)
... | 4,332 | 35.720339 | 100 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/pad/ref_pad_fp16.c | static int ref_pad_fp16(__fp16* data, __fp16* out_data, pad_param* param)
{
if(param->mode == 0)
{
// support pad on h,w dim only
if(param->pad_0_h == 0 && param->pad_0_w == 0 && param->pad_3_h == 0 && param->pad_3_w == 0)
{
for(int n = 0; n < param->in_n; ++n)
{
... | 4,483 | 36.057851 | 100 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/pad/ref_pad_fp32.c | static int ref_pad_fp32(float* data, float* out_data, pad_param* param)
{
if(param->mode == 0)
{
// support pad on h,w dim only
if(param->pad_0_h == 0 && param->pad_0_w == 0 && param->pad_3_h == 0 && param->pad_3_w == 0)
{
for(int n = 0; n < param->in_n; ++n)
{
... | 4,382 | 35.525 | 100 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/pad/ref_pad_int8.c | static int ref_pad_int8(int8_t* data, int8_t* out_data, pad_param* param)
{
if(param->mode == 0)
{
// support pad on h,w dim only
if(param->pad_0_h == 0 && param->pad_0_w == 0 && param->pad_3_h == 0 && param->pad_3_w == 0)
{
for(int n = 0; n < param->in_n; ++n)
{
... | 4,328 | 35.686441 | 100 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/log_softmax/ref_log_softmax_fp16.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 2,054 | 32.688525 | 117 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/log_softmax/ref_log_softmax_fp32.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,430 | 33.071429 | 118 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/log_softmax/ref_log_softmax_int8.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 2,365 | 32.323944 | 117 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/log_softmax/ref_log_softmax_uint8.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 2,118 | 33.737705 | 120 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/log_softmax/ref_log_softmax_kernel.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 3,001 | 25.333333 | 120 | h |
Tengine | Tengine-master/executor/operator/ref/kernel/prelu/ref_prelu_fp32.c |
static int ref_prelu_fp32(float* data, float* out_data, int dim0, int dim1, int dim2, int dim3, float* slope,
const prelu_param* param)
{
int offset = 0;
// nchw
// nhwc
for(int i = 0; i < dim0; i++)
{
for(int c = 0; c < dim1; c++)
{
for(int l =... | 977 | 29.5625 | 109 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/prelu/ref_prelu_fp16.c | static int ref_prelu_fp16(__fp16* data, __fp16* out_data, int dim0, int dim1, int dim2, int dim3, float* slope,
prelu_param* param)
{
int offset = 0;
//__fp16* data = ( __fp16* )data;
for(int i = 0; i < dim0; i++)
{
for(int c = 0; c < dim1; c++)
{
fo... | 1,283 | 31.923077 | 111 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/prelu/ref_prelu_int8.c |
static int ref_prelu_int8(int8_t* data, int8_t* out_data, int dim0, int dim1, int dim2, int dim3, float* slope,
const prelu_param* param)
{
int offset;
for(int i = 0; i < dim0; i++)
{
for(int c = 0; c < dim1; c++)
{
for(int l = 0; l < dim2; l++)
... | 1,091 | 32.090909 | 111 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/prelu/ref_prelu_uint8.c |
static int ref_prelu_uint8(uint8_t* data, uint8_t* out_data, int dim0, int dim1, int dim2, int dim3, float* slope,
const prelu_param* param)
{
int offset;
for(int i = 0; i < dim0; i++)
{
for(int c = 0; c < dim1; c++)
{
for(int l = 0; l < dim2; l++)
... | 1,125 | 33.121212 | 114 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/prelu/ref_prelu_kernel.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,675 | 22.605634 | 108 | h |
Tengine | Tengine-master/executor/operator/ref/kernel/comparison/ref_comparison_fp32.c | void comp_equal(int input_hw, int input_hw_1, int input_count4, int input1_count4, float* input0, float* input1,
comparison_param* param, float* output)
{
if(input1_count4 == 1)
{
for(int i = 0; i < input_count4; ++i)
{
*output++ = (input0[i] == input1[0]);
}
... | 13,251 | 29.890443 | 115 | c |
Tengine | Tengine-master/executor/operator/ref/kernel/spaceToBatchND/ref_SpaceToBatchND_kernel.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,806 | 21.5875 | 109 | h |
Tengine | Tengine-master/executor/operator/ref/kernel/spaceToBatchND/ref_SpaceToBatchND_fp32.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 5,956 | 49.91453 | 132 | c |
Fast-Perching | Fast-Perching-master/src/traj_opt/include/traj_opt/traj_opt.h | #pragma once
#include <ros/ros.h>
#include <chrono>
#include <thread>
#include <vis_utils/vis_utils.hpp>
#include "minco.hpp"
namespace traj_opt {
class TrajOpt {
public:
ros::NodeHandle nh_;
std::shared_ptr<vis_utils::VisUtils> visPtr_;
bool pause_debug_ = false;
// # pieces and # key points
int N_, K_,... | 3,074 | 33.550562 | 65 | h |
Fast-Perching | Fast-Perching-master/src/odom_vis/pose_utils/include/pose_utils.h | #ifndef POSE_UTILS_H
#define POSE_UTILS_H
#include <iostream>
#include "armadillo"
#define PI 3.14159265359
#define NUM_INF 999999.9
using namespace arma;
using namespace std;
// Rotation ---------------------
mat ypr_to_R(const colvec& ypr);
mat yaw_to_R(double yaw);
colvec R_to_ypr(const mat& R);
mat quaternio... | 1,138 | 20.092593 | 65 | h |
2021.0096 | 2021.0096-master/src/clustering_c++/matlab_util.h | #ifndef MATLAB_CALLER_MATLAB_UTIL_H
#define MATLAB_CALLER_MATLAB_UTIL_H
#include "MatlabEngine.hpp"
#include "MatlabDataArray.hpp"
#include <armadillo>
std::unique_ptr<matlab::engine::MATLABEngine> init_matlab(std::string &session_name, const char *sdp_solver_folder);
std::unique_ptr<matlab::engine::MATLABEngine> st... | 1,271 | 54.304348 | 118 | h |
2021.0096 | 2021.0096-master/src/clustering_c++/Kmeans.h | #ifndef CLUSTERING_KMEANS_H
#define CLUSTERING_KMEANS_H
#include <armadillo>
#include "kmeans_util.h"
class Kmeans {
private:
bool verbose;
arma::mat data;
arma::mat centroids;
arma::vec assignments;
int n, d, k;
double loss;
LinkConstraint constraint;
double objectiveFunction();
... | 819 | 20.025641 | 131 | h |
2021.0096 | 2021.0096-master/src/clustering_c++/kmeans_util.h | #ifndef CLUSTERING_KMEANS_UTIL_H
#define CLUSTERING_KMEANS_UTIL_H
#include <armadillo>
#include <set>
typedef struct LinkConstraint {
// must-link
std::map<int, std::set<int>> ml_graph;
// cannot-link
std::map<int, std::set<int>> cl_graph;
} LinkConstraint;
bool sort_by_value(const std::pair<int, d... | 701 | 29.521739 | 117 | h |
2021.0096 | 2021.0096-master/src/clustering_c++/config_params.h | #ifndef CLUSTERING_CONFIG_PARAMS_H
#define CLUSTERING_CONFIG_PARAMS_H
#define ROOT -1
#define CANNOT_LINK 0
#define MUST_LINK 1
#define DEFAULT 0
#define ABSOLUTE 1
#define NORM 2
#define BEST_FIRST 0
#define DEPTH_FIRST 1
#define BREADTH_FIRST 2
// data full path
extern const char *data_path;
extern const char *lo... | 1,383 | 24.62963 | 48 | h |
2021.0096 | 2021.0096-master/src/clustering_c++/sdp_solver_util.h | #ifndef CLUSTERING_SDP_SOLVER_UTIL_H
#define CLUSTERING_SDP_SOLVER_UTIL_H
#include <armadillo>
#include <set>
#include <MatlabEngine.hpp>
typedef struct SDPResult {
int flag;
arma::mat X;
double lb;
int n_ineq;
int cp_iter;
int cp_flag;
double n_pair;
double n_triangle;
double n_c... | 793 | 22.352941 | 68 | h |
lighthouse | lighthouse-master/coverage/pin/ImageManager.h | #ifndef IMAGEMANAGER_H_
#define IMAGEMANAGER_H_
#include <string>
#include <set>
#include "pin.H"
struct LoadedImage {
std::string name_;
ADDRINT low_;
ADDRINT high_;
LoadedImage(const std::string& n = "", ADDRINT low = 0, ADDRINT high = 0)
: name_(n)
, low_(low)
, high_(high... | 1,330 | 23.2 | 77 | h |
lighthouse | lighthouse-master/coverage/pin/TraceFile.h | #ifndef TRACEFILE_H_
#define TRACEFILE_H_
#include <string>
#include <cstdio>
#include <cstdlib>
#include <iostream>
class TraceFile {
public:
TraceFile(const std::string& filename)
{
m_file = fopen(filename.c_str(), "w+");
if (!m_file) {
std::cerr << "Could not open the log file."... | 1,123 | 20.615385 | 71 | h |
hping | hping-master/resolve.c | /*
* $smu-mark$
* $name: resolve.c$
* $author: Salvatore Sanfilippo <antirez@invece.org>$
* $copyright: Copyright (C) 1999 by Salvatore Sanfilippo$
* $license: This software is under GPL version 2 of license$
* $date: Fri Nov 5 11:55:49 MET 1999$
* $rev: 8$
*/
/* $Id: resolve.c,v 1.2 2003/09/01 00:22... | 1,278 | 22.254545 | 62 | c |
hping | hping-master/antigetopt.c | /* antigetopt -- a getopt replacement
* Copyright(C) 2001 Salvatore Sanfilippo <antirez@invece.org>
* This software is released under the GPL license
* see the COPYING file for more information */
/* $Id: antigetopt.c,v 1.2 2003/09/01 00:22:06 antirez Exp $ */
/* TODO:
* argument list sanity check */
#include <s... | 6,843 | 21.966443 | 80 | c |
hping | hping-master/adbuf.h | /* adbuf.h - header file for adbuf.c
*
* Copyright(C) 2001-2002 Salvatore Sanfilippo <antirez@invece.org>
* All rights reserved.
* See the LICENSE file for COPYRIGHT and PERMISSION notice */
/* $Id: adbuf.h,v 1.1.1.1 2003/08/31 17:24:00 antirez Exp $ */
#ifndef _ADBUF_H
#define _ADBUF_H
#include <sys/types.h>
s... | 1,520 | 32.065217 | 67 | h |
hping | hping-master/sendudp.c | /*
* $smu-mark$
* $name: sendudp.c$
* $author: Salvatore Sanfilippo <antirez@invece.org>$
* $copyright: Copyright (C) 1999 by Salvatore Sanfilippo$
* $license: This software is under GPL version 2 of license$
* $date: Fri Nov 5 11:55:49 MET 1999$
* $rev: 8$
*/
/* $Id: sendudp.c,v 1.2 2003/09/01 00:22... | 1,982 | 23.182927 | 68 | c |
hping | hping-master/getusec.c | /*
* $smu-mark$
* $name: getusec.c$
* $author: Salvatore Sanfilippo <antirez@invece.org>$
* $copyright: Copyright (C) 1999 by Salvatore Sanfilippo$
* $license: This software is under GPL version 2 of license$
* $date: Fri Nov 5 11:55:47 MET 1999$
* $rev: 8$
*/
/* $Id: getusec.c,v 1.2 2003/09/01 00:22... | 981 | 22.380952 | 67 | c |
hping | hping-master/main.c | /*
* $smu-mark$
* $name: main.c$
* $author: Salvatore Sanfilippo <antirez@invece.org>$
* $copyright: Copyright (C) 1999 by Salvatore Sanfilippo$
* $license: This software is under GPL version 2 of license$
* $date: Fri Nov 5 11:55:48 MET 1999$
* $rev: 8$
*/
/*
* hping official page at http://www.kyu... | 9,039 | 22.480519 | 74 | c |
hping | hping-master/sendip_handler.c | /*
* $smu-mark$
* $name: sendip_handler.c$
* $author: Salvatore Sanfilippo <antirez@invece.org>$
* $copyright: Copyright (C) 1999 by Salvatore Sanfilippo$
* $license: This software is under GPL version 2 of license$
* $date: Fri Nov 5 11:55:49 MET 1999$
* $rev: 3$
*/
/* $Id: sendip_handler.c,v 1.2 20... | 1,666 | 22.814286 | 76 | c |
hping | hping-master/sockopt.c | /*
* $smu-mark$
* $name: sockopt.c$
* $author: Salvatore Sanfilippo <antirez@invece.org>$
* $copyright: Copyright (C) 1999 by Salvatore Sanfilippo$
* $license: This software is under GPL version 2 of license$
* $date: Fri Nov 5 11:55:49 MET 1999$
* $rev: 8$
*/
/* $Id: sockopt.c,v 1.3 2003/09/07 11:21... | 909 | 21.195122 | 63 | c |
hping | hping-master/in.h | /* Copyright (C) 2000,2001 Salvatore Sanfilippo <antirez@invece.org> */
#ifndef ARS_IPPROTO_IP
#define ARS_IPPROTO_IP 0 /* Dummy protocol for TCP. */
#define ARS_IPPROTO_HOPOPTS 0 /* IPv6 Hop-by-Hop options. */
#define ARS_IPPROTO_ICMP 1 /* Internet Control Message Protocol. */
#define ARS_IPPROTO_IGMP 2 /* Intern... | 1,747 | 50.411765 | 73 | h |
hping | hping-master/gethostname.c | /*
* $smu-mark$
* $name: gethostname.c$
* $author: Salvatore Sanfilippo <antirez@invece.org>$
* $copyright: Copyright (C) 1999 by Salvatore Sanfilippo$
* $license: This software is under GPL version 2 of license$
* $date: Fri Nov 5 11:55:47 MET 1999$
* $rev: 8$
*/
/* $Id: gethostname.c,v 1.2 2003/09/... | 1,143 | 21 | 64 | c |
hping | hping-master/rtt.c | /*
* $smu-mark$
* $name: rtt.c$
* $author: Salvatore Sanfilippo <antirez@invece.org>$
* $copyright: Copyright (C) 1999 by Salvatore Sanfilippo$
* $license: This software is under GPL version 2 of license$
* $date: Fri Nov 5 11:55:49 MET 1999$
* $rev: 3$
*/
/* $Id: rtt.c,v 1.2 2003/09/01 00:22:06 anti... | 2,628 | 24.77451 | 74 | c |
hping | hping-master/version.c | /*
* $smu-mark$
* $name: version.c$
* $author: Salvatore Sanfilippo <antirez@invece.org>$
* $copyright: Copyright (C) 1999 by Salvatore Sanfilippo$
* $license: This software is under GPL version 2 of license$
* $date: Fri Nov 5 11:55:50 MET 1999$
* $rev: 8$
*/
/* $Id: version.c,v 1.3 2004/04/09 23:38... | 660 | 21.033333 | 66 | c |
hping | hping-master/antigetopt.h | #ifndef __ANTIGETOPT_H
#define __ANTIGETOPT_H
/* special return codes */
enum { AGO_EOF=4000, AGO_ALONE, AGO_UNKNOWN, AGO_REQARG, AGO_RESET, AGO_AMBIG };
/* option flags */
#define AGO_NOARG (1<<0) /* no argument */
#define AGO_NEEDARG (1<<1) /* required argument */
#define AGO_OPTARG (1<<2) /* optional argument *... | 1,022 | 27.416667 | 80 | h |
hping | hping-master/sendtcp.c | /*
* $smu-mark$
* $name: sendtcp.c$
* $author: Salvatore Sanfilippo <antirez@invece.org>$
* $copyright: Copyright (C) 1999 by Salvatore Sanfilippo$
* $license: This software is under GPL version 2 of license$
* $date: Fri Nov 5 11:55:49 MET 1999$
* $rev: 8$
*/
/* $Id: sendtcp.c,v 1.2 2003/09/01 00:22... | 2,682 | 25.303922 | 68 | c |
hping | hping-master/statistics.c | /*
* $smu-mark$
* $name: statistics.c$
* $author: Salvatore Sanfilippo <antirez@invece.org>$
* $copyright: Copyright (C) 1999 by Salvatore Sanfilippo$
* $license: This software is under GPL version 2 of license$
* $date: Fri Nov 5 11:55:50 MET 1999$
* $rev: 8$
*/
/* $Id: statistics.c,v 1.3 2004/04/09... | 1,166 | 20.611111 | 64 | c |
hping | hping-master/sbignum-tables.c | #include "sbignum-tables.h"
#include "sbignum.h"
/* maps a number to a char */
char *cset = "0123456789abcdefghijklmnopqrstuvwxyz";
/* maps a char to a number */
int8_t r_cset[256] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
... | 13,228 | 42.37377 | 65 | c |
hping | hping-master/memlock.c | /*
* $smu-mark$
* $name: memlock.c$
* $other_author: Alfonso De Gregorio <dira@speedcom.it>
* $other_copyright: Copyright (C) 1999 by Alfonso De Gregorio
* $license: This software is under GPL version 2 of license$
* $date: Fri Nov 5 11:55:48 MET 1999$
* $rev: 2$
*/
/* $Id: memlock.c,v 1.2 2003/09/01 00:22:06... | 705 | 21.0625 | 62 | c |
hping | hping-master/ars.h | /* Copyright (C) 2000,2001 Salvatore Sanfilippo <antirez@invece.org>
* See the LICENSE file for more information. */
/* $Id: ars.h,v 1.4 2004/06/04 07:22:38 antirez Exp $ */
#ifndef _ARS_H
#define _ARS_H
/* define before including sys/socket.h */
#if defined(__APPLE__) && !defined(_BSD_SOCKLEN_T_)
#define _BSD_SOCK... | 16,177 | 29.409774 | 83 | h |
hping | hping-master/memunlock.c | /*
* $smu-mark$
* $name: memunlock.c$
* $other_author: Alfonso De Gregorio <dira@speedcom.it>
* $other_copyright: Copyright (C) 1999 by Alfonso De Gregorio
* $license: This software is under GPL version 2 of license$
* $date: Fri Nov 5 11:55:48 MET 1999$
* $rev: 2$
*/
/* $Id: memunlock.c,v 1.2 2003/09/01 00:2... | 687 | 21.193548 | 62 | c |
hping | hping-master/logicmp.c | /*
* $smu-mark$
* $name: logicmp.c$
* $author: Salvatore Sanfilippo <antirez@invece.org>$
* $copyright: Copyright (C) 1999 by Salvatore Sanfilippo$
* $license: This software is under GPL version 2 of license$
* $date: Fri Nov 5 11:55:48 MET 1999$
* $rev: 8$
*/
/* $Id: logicmp.c,v 1.2 2003/09/01 00:22... | 1,924 | 24.666667 | 78 | c |
hping | hping-master/memstr.c | /*
* $smu-mark$
* $name: memstr.c$
* $author: Salvatore Sanfilippo <antirez@invece.org>$
* $copyright: Copyright (C) 1999 by Salvatore Sanfilippo$
* $license: This software is under GPL version 2 of license$
* $date: Fri Nov 5 11:55:48 MET 1999$
* $rev: 4$
*/
/* $Id: memstr.c,v 1.2 2003/09/01 00:22:0... | 646 | 22.107143 | 62 | c |
hping | hping-master/scan.c | /* Scanner mode for hping2
* Copyright(C) 2003 Salvatore Sanfilippo
* All rights reserved */
/* TODO:
* an application-level aware UDP scanner.
* add ICMP handling in replies.
* The algorithm is far from be optimal, also there isn't a clear
* way to delay smaller amounts of time then usleep(1) without
* to use ... | 13,061 | 22.620253 | 80 | c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.