Skip to content

Commit 8d71d8e

Browse files
committed
Add speed_exp.cpp
1 parent 04355f5 commit 8d71d8e

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

Algorithm optimization/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
- speed_meanFilter_in_gray_image.cpp 使用x86循环展开,openmp优化均值滤波算法
66
- speed_medianFilter_in_gray_image.cpp AVX和Openmp,优化中值滤波算法
77
- speed_twoVector_distance.cpp AVX和x86循环展开,优化计算两个向量距离算法
8-
- Huang_Fast_MedianBlur.cpp 利用直方图实现快速中值滤波算法,算法原理:https://blog.csdn.net/just_sort/article/details/87994573
8+
- Huang_Fast_MedianBlur.cpp 利用直方图实现快速中值滤波算法,算法原理:https://blog.csdn.net/just_sort/article/details/87994573
9+
- speed_exp.cpp 在神经网络权值较小的情况下的快速exp算法,算法原理:https://blog.csdn.net/just_sort/article/details/88128200
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
inline float exp1(float x) {
2+
x = 1.0 + x / 256.0;
3+
x *= x; x *= x; x *= x; x *= x;
4+
x *= x; x *= x; x *= x; x *= x;
5+
return x;
6+
}
7+
8+
inline float exp2(double x) {
9+
x = 1.0 + x / 1024;
10+
x *= x; x *= x; x *= x; x *= x;
11+
x *= x; x *= x; x *= x; x *= x;
12+
x *= x; x *= x;
13+
return x;
14+
}

0 commit comments

Comments
 (0)