提交 85bcb286 编写于 作者: T tensor-tang

refine vmul jitcode

test=develop
上级 a764e900
...@@ -35,7 +35,7 @@ bool VMulJitCode::init(int d) { ...@@ -35,7 +35,7 @@ bool VMulJitCode::init(int d) {
} }
void VMulJitCode::generate() { void VMulJitCode::generate() {
preCode(); // do not need push stack, and do not need save avx512reg if do not use avx512
int stride = sizeof(float) * AVX_FLOAT_BLOCK; int stride = sizeof(float) * AVX_FLOAT_BLOCK;
for (int i = 0; i < num_ / AVX_FLOAT_BLOCK; ++i) { for (int i = 0; i < num_ / AVX_FLOAT_BLOCK; ++i) {
vmovups(ymm_src1, ptr[param1 + i * stride]); vmovups(ymm_src1, ptr[param1 + i * stride]);
...@@ -43,7 +43,7 @@ void VMulJitCode::generate() { ...@@ -43,7 +43,7 @@ void VMulJitCode::generate() {
vmulps(ymm_dst, ymm_src1, ymm_src2); vmulps(ymm_dst, ymm_src1, ymm_src2);
vmovups(ptr[param3 + stride * i], ymm_dst); vmovups(ptr[param3 + stride * i], ymm_dst);
} }
postCode(); ret();
} }
} // namespace gen } // namespace gen
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册