@@ -13,15 +13,12 @@ const_nums<double>::const_nums()
1313{
1414 base_device::memory::resize_memory_op<double , base_device::DEVICE_CPU>()(
1515 this ->cpu_ctx , this ->zero , 1 );
16- // this->zero = (double*)malloc(sizeof(double));
1716 this ->zero [0 ] = 0.0 ;
1817 base_device::memory::resize_memory_op<double , base_device::DEVICE_CPU>()(
1918 this ->cpu_ctx , this ->one , 1 );
20- // this->one = (double*)malloc(sizeof(double));
2119 this ->one [0 ] = 1.0 ;
2220 base_device::memory::resize_memory_op<double , base_device::DEVICE_CPU>()(
2321 this ->cpu_ctx , this ->neg_one , 1 );
24- // this->neg_one = (double*)malloc(sizeof(double));
2522 this ->neg_one [0 ] = -1.0 ;
2623}
2724
@@ -31,15 +28,12 @@ const_nums<float>::const_nums()
3128{
3229 base_device::memory::resize_memory_op<float , base_device::DEVICE_CPU>()(
3330 this ->cpu_ctx , this ->zero , 1 );
34- // this->zero = (float*)malloc(sizeof(float));
3531 this ->zero [0 ] = 0.0 ;
3632 base_device::memory::resize_memory_op<float , base_device::DEVICE_CPU>()(
3733 this ->cpu_ctx , this ->one , 1 );
38- // this->one = (float*)malloc(sizeof(float));
3934 this ->one [0 ] = 1.0 ;
4035 base_device::memory::resize_memory_op<float , base_device::DEVICE_CPU>()(
4136 this ->cpu_ctx , this ->neg_one , 1 );
42- // this->neg_one = (float*)malloc(sizeof(float));
4337 this ->neg_one [0 ] = -1.0 ;
4438}
4539
@@ -49,15 +43,12 @@ const_nums<std::complex<double>>::const_nums()
4943{
5044 base_device::memory::resize_memory_op<std::complex <double >, base_device::DEVICE_CPU>()(
5145 this ->cpu_ctx , this ->zero , 1 );
52- // this->zero = (std::complex<double>*)malloc(sizeof(std::complex<double>));
5346 this ->zero [0 ] = std::complex <double >(0.0 , 0.0 );
5447 base_device::memory::resize_memory_op<std::complex <double >, base_device::DEVICE_CPU>()(
5548 this ->cpu_ctx , this ->one , 1 );
56- // this->one = (std::complex<double>*)malloc(sizeof(std::complex<double>));
5749 this ->one [0 ] = std::complex <double >(1.0 , 0.0 );
5850 base_device::memory::resize_memory_op<std::complex <double >, base_device::DEVICE_CPU>()(
5951 this ->cpu_ctx , this ->neg_one , 1 );
60- // this->neg_one = (std::complex<double>*)malloc(sizeof(std::complex<double>));
6152 this ->neg_one [0 ] = std::complex <double >(-1.0 , 0.0 );
6253}
6354
@@ -67,14 +58,11 @@ const_nums<std::complex<float>>::const_nums()
6758{
6859 base_device::memory::resize_memory_op<std::complex <float >, base_device::DEVICE_CPU>()(
6960 this ->cpu_ctx , this ->zero , 1 );
70- // this->zero = (std::complex<float>*)malloc(sizeof(std::complex<float>));
7161 this ->zero [0 ] = std::complex <float >(0.0 , 0.0 );
7262 base_device::memory::resize_memory_op<std::complex <float >, base_device::DEVICE_CPU>()(
7363 this ->cpu_ctx , this ->one , 1 );
74- // this->one = (std::complex<float>*)malloc(sizeof(std::complex<float>));
7564 this ->one [0 ] = std::complex <float >(1.0 , 0.0 );
7665 base_device::memory::resize_memory_op<std::complex <float >, base_device::DEVICE_CPU>()(
7766 this ->cpu_ctx , this ->neg_one , 1 );
78- // this->neg_one = (std::complex<float>*)malloc(sizeof(std::complex<float>));
7967 this ->neg_one [0 ] = std::complex <float >(-1.0 , 0.0 );
8068}
0 commit comments