Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 6b46062e authored by hhakim's avatar hhakim
Browse files

Copy GPU factors to avoid double-free corruption in test of TransformHelper<FPP,GPU2>.

parent fa584144
Branches
Tags
No related merge requests found
......@@ -20,13 +20,13 @@ int main()
MatDense<double,GPU2> gpu_mat2(*cpu_mat2);
Faust::MatSparse<double,GPU2> gpu_mat3(*cpu_mat3);
vector<MatGeneric<double,GPU2>*> gpu_fact_list = {&gpu_mat1, &gpu_mat2, &gpu_mat3};
TransformHelper<double, GPU2> th2(gpu_fact_list);
TransformHelper<double, GPU2> th2(gpu_fact_list, 1, false, true);
int flag;
th2.display();
cout << "gpu norm fro:" << th2.normFro() << endl;
cout << "gpu spectral norm fro:" << th2.spectralNorm(100, 1e-3, flag) << endl;
vector<MatGeneric<double,Cpu>*> cpu_fact_list = {cpu_mat1, cpu_mat2, cpu_mat3};
TransformHelper<double, Cpu> th2_cpu(cpu_fact_list);
TransformHelper<double, Cpu> th2_cpu(cpu_fact_list, 1, false, true);
th2_cpu.display();
cout << "cpu norm fro:" <<th2_cpu.normFro() << endl;
cout << "cpu spectral norm:" <<th2_cpu.spectralNorm(100,1e-3, flag) << endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment