inaos / iron-array

2 stars 0 forks source link

Check if copies of views can be avoided in reductions #578

Closed FrancescAlted closed 2 years ago

FrancescAlted commented 2 years ago

Until now, a copy of a view was needed during reductions: https://github.com/inaos/iron-array/blob/develop/src/reductions/iarray_reduce.c#L1372-L1376. However, the new view implementation should avoid doing the copy. Check that this can be done, and activate that. Also, some benchmarking would be welcome.

martaiborra commented 2 years ago

Checked, copies of views cannot be avoided when computing a reduction since a reduction is applied on the whole array (whole blocks). We should be able to only apply the pre filter to the slice.