Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
faust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.11.4.
Show more breadcrumbs
faust group
faust
Commits
88dd27e3
Commit
88dd27e3
authored
2 years ago
by
hhakim
Browse files
Options
Downloads
Patches
Plain Diff
Add a unit test for MatButterfly::normL1.
parent
a97d03c6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc/test/src/C++/faust_butterfly_mat.cpp.in
+9
-0
9 additions, 0 deletions
misc/test/src/C++/faust_butterfly_mat.cpp.in
with
9 additions
and
0 deletions
misc/test/src/C++/faust_butterfly_mat.cpp.in
+
9
−
0
View file @
88dd27e3
...
...
@@ -162,10 +162,18 @@ void testNorm2(const MatButterfly<FPP, Cpu>& butterflyMat, const MatSparse<FPP,
std::cout << "MatButterfly fro-norm OK" << std::endl;
}
void testNorm1(const MatButterfly<FPP, Cpu>& butterflyMat, const MatSparse<FPP, Cpu>& spButterflyMat)
{
// cout << butterflyMat.normL1() << endl;
// cout << spButterflyMat.normL1() << endl;
assert(std::abs(butterflyMat.normL1() - spButterflyMat.normL1()) < 1e-6);
std::cout << "MatButterfly norm-1 OK" << std::endl;
}
void testToMatSparse(const MatButterfly<FPP, Cpu>& butterflyMat, const MatSparse<FPP, Cpu>& spButterflyMat)
{
auto convSpButterflyMat = butterflyMat.toMatSparse();
// convSpButterflyMat.Display();
assert(verifyMatEq(MatDense<FPP, Cpu>(convSpButterflyMat), MatDense<FPP, Cpu>(spButterflyMat), 1e-6));
std::cout << "MatButterfly::toMatSparse OK" << std::endl;
...
...
@@ -283,5 +291,6 @@ int main(int argc, char** argv)
testGetCoeff(butterflyMat, spButterflyMat);
testHasNaN(butterflyMat, spButterflyMat);
testNZinds(butterflyMat, spButterflyMat);
testNorm1(butterflyMat, spButterflyMat);
return EXIT_SUCCESS;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment