Skip to content

Commit

Permalink
a bit cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Li authored and Samuel Li committed Sep 19, 2023
1 parent 236029f commit 93e2045
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/CDF97.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,7 @@ void sperr::CDF97::m_idwt3d_wavelet_packet()

void sperr::CDF97::m_dwt3d_dyadic()
{
// clang-format off
const auto xforms = std::array<size_t, 3>{sperr::num_of_xforms(m_dims[0]),
sperr::num_of_xforms(m_dims[1]),
sperr::num_of_xforms(m_dims[2])};
const auto num_xforms = *std::min_element(xforms.cbegin(), xforms.cend());
// clang-format on
const auto num_xforms = sperr::num_of_xforms(*std::min_element(m_dims.cbegin(), m_dims.cend()));

for (size_t lev = 0; lev < num_xforms; lev++) {
auto app_x = sperr::calc_approx_detail_len(m_dims[0], lev);
Expand All @@ -250,12 +245,7 @@ void sperr::CDF97::m_dwt3d_dyadic()

void sperr::CDF97::m_idwt3d_dyadic()
{
// clang-format off
const auto xforms = std::array<size_t, 3>{sperr::num_of_xforms(m_dims[0]),
sperr::num_of_xforms(m_dims[1]),
sperr::num_of_xforms(m_dims[2])};
const auto num_xforms = *std::min_element(xforms.cbegin(), xforms.cend());
// clang-format on
const auto num_xforms = sperr::num_of_xforms(*std::min_element(m_dims.cbegin(), m_dims.cend()));

for (size_t lev = num_xforms; lev > 0; lev--) {
auto app_x = sperr::calc_approx_detail_len(m_dims[0], lev - 1);
Expand Down

0 comments on commit 93e2045

Please sign in to comment.