提交 e0ac4622 编写于 作者: L liuqi 提交者: wuchenghui

Use iters at relu and addn benchmark.

上级 d30b11a0
......@@ -32,10 +32,14 @@ static void AddNBenchmark(int iters, int n, int type) {
if (type == DeviceType::CPU) {
AddNFunctor<DeviceType::CPU, float> addn_functor;
addn_functor(inputs, &output[0], n);
while (--iters) {
addn_functor(inputs, &output[0], n);
}
} else if (type == DeviceType::NEON) {
AddNFunctor<DeviceType::NEON, float> neon_addn_functor;
neon_addn_functor(inputs, &output[0], n);
while (--iters) {
neon_addn_functor(inputs, &output[0], n);
}
}
}
......
......@@ -27,10 +27,14 @@ static void ReluBenchmark(int iters, int n, int type) {
if (type == DeviceType::CPU) {
ReluFunctor<DeviceType::CPU, float> relu_functor;
relu_functor(&input[0], &output[0], n);
while (--iters) {
relu_functor(&input[0], &output[0], n);
}
} else if (type == DeviceType::NEON) {
ReluFunctor<DeviceType::NEON, float> neon_relu_functor;
neon_relu_functor(&input[0], &output[0], n);
while (--iters) {
neon_relu_functor(&input[0], &output[0], n);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册