@@ -75,17 +75,17 @@ class TestModuleHsolverMathKernel : public ::testing::Test
7575 using vector_mul_real_op_cpu = ModuleBase::vector_mul_real_op<std::complex <double >, base_device::DEVICE_CPU>;
7676 using vector_mul_vector_op_cpu = ModuleBase::vector_mul_vector_op<std::complex <double >, base_device::DEVICE_CPU>;
7777 using vector_div_vector_op_cpu = ModuleBase::vector_div_vector_op<std::complex <double >, base_device::DEVICE_CPU>;
78- using constantvector_addORsub_constantVector_op_cpu
79- = ModuleBase::constantvector_addORsub_constantVector_op <std::complex <double >, base_device::DEVICE_CPU>;
78+ using vector_add_vector_op_cpu
79+ = ModuleBase::vector_add_vector_op <std::complex <double >, base_device::DEVICE_CPU>;
8080 using axpy_op_cpu = ModuleBase::axpy_op<std::complex <double >, base_device::DEVICE_CPU>;
8181 using scal_op_cpu = ModuleBase::scal_op<double , base_device::DEVICE_CPU>;
8282 using gemv_op_cpu = ModuleBase::gemv_op<std::complex <double >, base_device::DEVICE_CPU>;
8383 // gpu operator
8484 using vector_mul_real_op_gpu = ModuleBase::vector_mul_real_op<std::complex <double >, base_device::DEVICE_GPU>;
8585 using vector_mul_vector_op_gpu = ModuleBase::vector_mul_vector_op<std::complex <double >, base_device::DEVICE_GPU>;
8686 using vector_div_vector_op_gpu = ModuleBase::vector_div_vector_op<std::complex <double >, base_device::DEVICE_GPU>;
87- using constantvector_addORsub_constantVector_op_gpu
88- = ModuleBase::constantvector_addORsub_constantVector_op <std::complex <double >, base_device::DEVICE_GPU>;
87+ using vector_add_vector_op_gpu
88+ = ModuleBase::vector_add_vector_op <std::complex <double >, base_device::DEVICE_GPU>;
8989 using axpy_op_gpu = ModuleBase::axpy_op<std::complex <double >, base_device::DEVICE_GPU>;
9090 using scal_op_gpu = ModuleBase::scal_op<double , base_device::DEVICE_GPU>;
9191 using gemv_op_gpu = ModuleBase::gemv_op<std::complex <double >, base_device::DEVICE_GPU>;
@@ -174,12 +174,12 @@ class TestModuleHsolverMathKernel : public ::testing::Test
174174 {2.05256102 , -1.39373474 },
175175 {-0.10166335 , -0.49934031 }};
176176
177- // (3) for test constantvector_addORsub_constantVector_op
177+ // (3) for test vector_add_vector_op
178178 const double constant1 = 6.6 ;
179179 const double constant2 = 4.4 ;
180180 const std::vector<std::complex <double >> input1 = L;
181181 const std::vector<std::complex <double >> input2 = R;
182- const std::vector<std::complex <double >> output_constantvector_addORsub_constantVector_op
182+ const std::vector<std::complex <double >> output_vector_add_vector_op
183183 = {{-5.05571797 , -5.64586374 },
184184 {-14.76279273 , 4.05181248 },
185185 {21.81709620 , -17.11884992 },
@@ -294,19 +294,19 @@ TEST_F(TestModuleHsolverMathKernel, vector_div_vector_op_cpu)
294294 }
295295}
296296
297- TEST_F (TestModuleHsolverMathKernel, constantvector_addORsub_constantVector_op_cpu )
297+ TEST_F (TestModuleHsolverMathKernel, vector_add_vector_op_cpu )
298298{
299299 std::vector<std::complex <double >> output (input.size ());
300- constantvector_addORsub_constantVector_op_cpu ()(dim,
300+ vector_add_vector_op_cpu ()(dim,
301301 output.data (),
302302 input1.data (),
303303 constant1,
304304 input2.data (),
305305 constant2);
306306 for (int i = 0 ; i < input.size (); i++)
307307 {
308- EXPECT_LT (fabs (output[i].imag () - output_constantvector_addORsub_constantVector_op [i].imag ()), 1e-8 );
309- EXPECT_LT (fabs (output[i].real () - output_constantvector_addORsub_constantVector_op [i].real ()), 1e-8 );
308+ EXPECT_LT (fabs (output[i].imag () - output_vector_add_vector_op [i].imag ()), 1e-8 );
309+ EXPECT_LT (fabs (output[i].real () - output_vector_add_vector_op [i].real ()), 1e-8 );
310310 }
311311}
312312
@@ -478,7 +478,7 @@ TEST_F(TestModuleHsolverMathKernel, vector_div_vector_op_gpu)
478478 delete_memory_op ()(output_dev);
479479}
480480
481- TEST_F (TestModuleHsolverMathKernel, constantvector_addORsub_constantVector_op_gpu )
481+ TEST_F (TestModuleHsolverMathKernel, vector_add_vector_op_gpu )
482482{
483483 // in CPU
484484 std::vector<std::complex <double >> output (input.size ());
@@ -498,7 +498,7 @@ TEST_F(TestModuleHsolverMathKernel, constantvector_addORsub_constantVector_op_gp
498498 synchronize_memory_op ()(input2_dev, input2.data (), input.size ());
499499
500500 // run
501- constantvector_addORsub_constantVector_op_gpu ()(dim,
501+ vector_add_vector_op_gpu ()(dim,
502502 output_dev,
503503 input1_dev,
504504 constant1,
@@ -510,8 +510,8 @@ TEST_F(TestModuleHsolverMathKernel, constantvector_addORsub_constantVector_op_gp
510510
511511 for (int i = 0 ; i < input.size (); i++)
512512 {
513- EXPECT_LT (fabs (output[i].imag () - output_constantvector_addORsub_constantVector_op [i].imag ()), 1e-8 );
514- EXPECT_LT (fabs (output[i].real () - output_constantvector_addORsub_constantVector_op [i].real ()), 1e-8 );
513+ EXPECT_LT (fabs (output[i].imag () - output_vector_add_vector_op [i].imag ()), 1e-8 );
514+ EXPECT_LT (fabs (output[i].real () - output_vector_add_vector_op [i].real ()), 1e-8 );
515515 }
516516
517517 delete_memory_op ()(input1_dev);
0 commit comments