Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 1ddbb4cc authored by hhakim's avatar hhakim
Browse files

Add a unit test for MatButterfly::Clone.

parent bca1cd0b
No related branches found
No related tags found
No related merge requests found
......@@ -65,5 +65,21 @@ int main(int argc, char** argv)
std::cout << "Faust-sparse matrix product OK" << std::endl;
// test Clone
auto clone = butterflyMat.Clone();
auto X_ = MatDense<FPP, Cpu>::randMat(size, size);
MatDense<FPP, Cpu> refY_(*X);
MatDense<FPP, Cpu> testY_(*X);
butterflyMat.multiply(refY_, 'N');
clone->multiply(testY_, 'N');
auto errY_ = testY_;
errY_ -= refY_;
assert(errY_.norm() <= 1e-6);
std::cout << "MatButterfly cloning OK" << std::endl;
return EXIT_SUCCESS;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment