[MSLITE] clean fp32 bug
This commit is contained in:
parent
1cb8896ed8
commit
7486f2a20b
|
@ -172,7 +172,7 @@ static inline void simd_exp32(float src, float *dst) {
|
|||
float decimal = src - integer * param[0];
|
||||
fi int_exp;
|
||||
int_exp.i = (integer + 127) << 23;
|
||||
float decimal_exp =
|
||||
const float decimal_exp =
|
||||
1.0f + decimal * (1.0f + decimal * (0.5f + decimal * (param[3] + decimal * (param[2] + decimal * param[1]))));
|
||||
*dst = int_exp.f * decimal_exp;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
#include <string.h>
|
||||
#include "nnacl/errorcode.h"
|
||||
|
||||
int DoScatterND(void *output, const void *update, int *output_unit_offsets, ScatterNDParameter *param, int task_id) {
|
||||
int DoScatterND(void *output, const void *update, int *output_unit_offsets, const ScatterNDParameter *param,
|
||||
int task_id) {
|
||||
if (param->op_parameter.thread_num_ == 0) {
|
||||
return NNACL_ERR;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,8 @@ typedef struct ScatterNDParameter {
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
int DoScatterND(void *output, const void *update, int *output_unit_offsets, ScatterNDParameter *param, int task_id);
|
||||
int DoScatterND(void *output, const void *update, int *output_unit_offsets, const ScatterNDParameter *param,
|
||||
int task_id);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "nnacl/fp32/sparse_to_dense_fp32.h"
|
||||
#include "nnacl/errorcode.h"
|
||||
|
||||
int SparseToDenseSetDefault(float *output, float default_value, SparseToDenseParameter *param, int task_id) {
|
||||
int SparseToDenseSetDefault(float *output, float default_value, const SparseToDenseParameter *param, int task_id) {
|
||||
if (param->op_parameter_.thread_num_ == 0) {
|
||||
return NNACL_ERR;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
int SparseToDenseSetDefault(float *output, float default_value, SparseToDenseParameter *param, int task_id);
|
||||
int SparseToDenseSetDefault(float *output, float default_value, const SparseToDenseParameter *param, int task_id);
|
||||
int SparseToDense(int *indices_vec, const float *sparse_values, float default_value, float *output,
|
||||
SparseToDenseParameter *param, int task_id);
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Reference in New Issue