| Message ID | 20260805-libipa-algorithms-v7-32-7425b5b795d4@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Quoting Jacopo Mondi (2026-08-05 17:13:14) > Specialize Interpolator<>::interpolate() for uint8_t register size. > > Some platforms (Mali, Simple) use an 8 bit register size. Provide > a specialization for the that type of Interpolator<>::interpolate(). I look forward to Barnabas or Laurent checking this one, but I won't block it so: Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> > --- > src/ipa/libipa/lsc.cpp | 11 +++++++++++ > src/ipa/libipa/lsc.h | 7 +++++++ > 2 files changed, 18 insertions(+) > > diff --git a/src/ipa/libipa/lsc.cpp b/src/ipa/libipa/lsc.cpp > index a8b89bcedf57..cf9ea6e68c73 100644 > --- a/src/ipa/libipa/lsc.cpp > +++ b/src/ipa/libipa/lsc.cpp > @@ -102,6 +102,17 @@ void Interpolator<lsc::Components<uint16_t>>:: > for (auto const &[k, v] : a) > interpolateVector(v, b.at(k), dest[k], lambda); > } > + > +template<> > +void Interpolator<lsc::Components<uint8_t>>:: > + interpolate(const lsc::Components<uint8_t> &a, > + const lsc::Components<uint8_t> &b, > + lsc::Components<uint8_t> &dest, > + double lambda) > +{ > + for (auto const &[k, v] : a) > + interpolateVector(v, b.at(k), dest[k], lambda); > +} > #endif > > /** > diff --git a/src/ipa/libipa/lsc.h b/src/ipa/libipa/lsc.h > index 30330f284013..17d5a4a141c1 100644 > --- a/src/ipa/libipa/lsc.h > +++ b/src/ipa/libipa/lsc.h > @@ -48,6 +48,13 @@ void Interpolator<lsc::Components<uint16_t>>:: > const lsc::Components<uint16_t> &b, > lsc::Components<uint16_t> &dest, > double lambda); > + > +template<> > +void Interpolator<lsc::Components<uint8_t>>:: > + interpolate(const lsc::Components<uint8_t> &a, > + const lsc::Components<uint8_t> &b, > + lsc::Components<uint8_t> &dest, > + double lambda); > #endif /* __DOXYGEN__ */ > > class LscAlgorithmBase > > -- > 2.54.0 >
diff --git a/src/ipa/libipa/lsc.cpp b/src/ipa/libipa/lsc.cpp index a8b89bcedf57..cf9ea6e68c73 100644 --- a/src/ipa/libipa/lsc.cpp +++ b/src/ipa/libipa/lsc.cpp @@ -102,6 +102,17 @@ void Interpolator<lsc::Components<uint16_t>>:: for (auto const &[k, v] : a) interpolateVector(v, b.at(k), dest[k], lambda); } + +template<> +void Interpolator<lsc::Components<uint8_t>>:: + interpolate(const lsc::Components<uint8_t> &a, + const lsc::Components<uint8_t> &b, + lsc::Components<uint8_t> &dest, + double lambda) +{ + for (auto const &[k, v] : a) + interpolateVector(v, b.at(k), dest[k], lambda); +} #endif /** diff --git a/src/ipa/libipa/lsc.h b/src/ipa/libipa/lsc.h index 30330f284013..17d5a4a141c1 100644 --- a/src/ipa/libipa/lsc.h +++ b/src/ipa/libipa/lsc.h @@ -48,6 +48,13 @@ void Interpolator<lsc::Components<uint16_t>>:: const lsc::Components<uint16_t> &b, lsc::Components<uint16_t> &dest, double lambda); + +template<> +void Interpolator<lsc::Components<uint8_t>>:: + interpolate(const lsc::Components<uint8_t> &a, + const lsc::Components<uint8_t> &b, + lsc::Components<uint8_t> &dest, + double lambda); #endif /* __DOXYGEN__ */ class LscAlgorithmBase
Specialize Interpolator<>::interpolate() for uint8_t register size. Some platforms (Mali, Simple) use an 8 bit register size. Provide a specialization for the that type of Interpolator<>::interpolate(). Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> --- src/ipa/libipa/lsc.cpp | 11 +++++++++++ src/ipa/libipa/lsc.h | 7 +++++++ 2 files changed, 18 insertions(+)