Boost logo

Boost :

From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2019-07-23 00:04:38

On Mon, 22 Jul 2019 at 20:14, Miral Shah <miralshah2211_at_[hidden]> wrote:
> Although I used the solution provided by you and it works fine.
> I am still unclear why FIX2[1] is required and why tmp_view can't be used directly
> further in the code.
> [1]:

It is about the constness difference between

Notice the `c` in `gray8c_loc_t`.

The `temp_view` is the latter, without `c`, mutable, so it is
acceptable by convolve_rows, etc.
The `temp_conv` is the former, with `c` as that is required due to
signature of your
`adaptive_impl` function, which (simplified) looks like this

template <typename SrcView>
void adaptive_impl
    SrcView const& src_view,
    SrcView const& convolved_view,

As you can see, `convolved_view` is expected to be the same type as `src_view`.
It has to be that const/immutable

Does that make sense now?

You could have modified the signature of `adaptive_impl` a bit to
allow `tmp_view` in.

Best regards,

Mateusz Loskot,

Boost list run by Boost-Gil-Owners