diff options
author | Chris Robinson <[email protected]> | 2020-10-07 01:04:42 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-10-07 01:04:42 -0700 |
commit | af9c990277638832853c102d21fdb17686db6b01 (patch) | |
tree | 6e8c4dfaa48bd97923e1243244e1f744989b8c9c | |
parent | 5fbd02e60ec6f73a70b9b4591678540600552d96 (diff) |
Print the number of used measurements in sofa-info
-rw-r--r-- | utils/sofa-info.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/utils/sofa-info.cpp b/utils/sofa-info.cpp index 26a2ee3f..6dffef44 100644 --- a/utils/sofa-info.cpp +++ b/utils/sofa-info.cpp @@ -67,7 +67,15 @@ static void PrintCompatibleLayout(const uint m, const float *xyzs) return; } - fprintf(stdout, "Compatible Layout:\n\ndistance = %.3f", fds[0].mDistance); + uint used_elems{0}; + for(size_t fi{0u};fi < fds.size();++fi) + { + for(uint ei{fds[fi].mEvStart};ei < fds[fi].mEvCount;++ei) + used_elems += fds[fi].mAzCounts[ei]; + } + + fprintf(stdout, "Compatible Layout (%u of %u measurements):\n\ndistance = %.3f", used_elems, m, + fds[0].mDistance); for(size_t fi{1u};fi < fds.size();fi++) fprintf(stdout, ", %.3f", fds[fi].mDistance); |