E.g. in SPDHG the line self.x.sapyb(1., self._zbar, -self._tau, out=self._x_tmp), if self._tau is an array then -self._tau assigns another array, with increased memory usage.
Something that implements z = a * a_arr * x + b * b_arr * y efficiently will add more flexibility
Description
E.g. in SPDHG the line
self.x.sapyb(1., self._zbar, -self._tau, out=self._x_tmp)
, ifself._tau
is an array then-self._tau
assigns another array, with increased memory usage.Something that implements
z = a * a_arr * x + b * b_arr * y
efficiently will add more flexibility