1616
1717#include < OpenImageIO/half.h>
1818
19- #if defined(OIIO_USE_HWY) && OIIO_USE_HWY
19+ #if OIIO_USE_HWY
2020# include " imagebufalgo_hwy_pvt.h"
2121#endif
2222#include < OpenImageIO/dassert.h>
@@ -125,7 +125,7 @@ mul_impl_scalar(ImageBuf& R, const ImageBuf& A, cspan<float> b, ROI roi,
125125
126126
127127
128- #if defined(OIIO_USE_HWY) && OIIO_USE_HWY
128+ #if OIIO_USE_HWY
129129template <class Rtype , class Atype , class Btype >
130130static bool
131131mul_impl_hwy (ImageBuf& R, const ImageBuf& A, const ImageBuf& B, ROI roi,
@@ -168,7 +168,7 @@ mul_impl_hwy(ImageBuf& R, const ImageBuf& A, cspan<float> b, ROI roi,
168168 });
169169 return true ;
170170}
171- #endif // defined(OIIO_USE_HWY) && OIIO_USE_HWY
171+ #endif // OIIO_USE_HWY
172172
173173template <class Rtype , class Atype , class Btype >
174174static bool
@@ -181,7 +181,7 @@ mul_impl(ImageBuf& R, const ImageBuf& A, const ImageBuf& B, ROI roi,
181181 auto Rv = HwyPixels (R);
182182 auto Av = HwyPixels (A);
183183 auto Bv = HwyPixels (B);
184- const int nchannels = RoiNChannels ( roi);
184+ const int nchannels = roi. nchannels ( );
185185 const bool contig = ChannelsContiguous<Rtype>(Rv, nchannels)
186186 && ChannelsContiguous<Atype>(Av, nchannels)
187187 && ChannelsContiguous<Btype>(Bv, nchannels);
@@ -208,7 +208,7 @@ template<class Rtype, class Atype>
208208static bool
209209mul_impl (ImageBuf& R, const ImageBuf& A, cspan<float > b, ROI roi, int nthreads)
210210{
211- #if defined(OIIO_USE_HWY) && OIIO_USE_HWY
211+ #if OIIO_USE_HWY
212212 if (OIIO::pvt::enable_hwy && R.localpixels () && A.localpixels ())
213213 return mul_impl_hwy<Rtype, Atype>(R, A, b, roi, nthreads);
214214#endif
@@ -314,7 +314,7 @@ div_impl_scalar(ImageBuf& R, const ImageBuf& A, const ImageBuf& B, ROI roi,
314314
315315
316316
317- #if defined(OIIO_USE_HWY) && OIIO_USE_HWY
317+ #if OIIO_USE_HWY
318318template <class Rtype , class Atype , class Btype >
319319static bool
320320div_impl_hwy (ImageBuf& R, const ImageBuf& A, const ImageBuf& B, ROI roi,
@@ -336,7 +336,7 @@ div_impl_hwy(ImageBuf& R, const ImageBuf& A, const ImageBuf& B, ROI roi,
336336 return hwy_binary_perpixel_op<Rtype, Atype, Btype>(R, A, B, roi, nthreads,
337337 op);
338338}
339- #endif // defined(OIIO_USE_HWY) && OIIO_USE_HWY
339+ #endif // OIIO_USE_HWY
340340
341341template <class Rtype , class Atype , class Btype >
342342static bool
@@ -349,7 +349,7 @@ div_impl(ImageBuf& R, const ImageBuf& A, const ImageBuf& B, ROI roi,
349349 auto Rv = HwyPixels (R);
350350 auto Av = HwyPixels (A);
351351 auto Bv = HwyPixels (B);
352- const int nchannels = RoiNChannels ( roi);
352+ const int nchannels = roi. nchannels ( );
353353 const bool contig = ChannelsContiguous<Rtype>(Rv, nchannels)
354354 && ChannelsContiguous<Atype>(Av, nchannels)
355355 && ChannelsContiguous<Btype>(Bv, nchannels);
0 commit comments