T FuncEval(const thrust::device_vector<FunctionObj<T> > &f_obj, const T *x_in) { return thrust::inner_product(f_obj.cbegin(), f_obj.cend(), thrust::device_pointer_cast(x_in), static_cast<T>(0), thrust::plus<T>(), FuncEvalF<T>()); }
void ProxEval(const thrust::device_vector<FunctionObj<T> > &f_obj, T rho, const T *x_in, T *x_out) { thrust::transform(thrust::device, f_obj.cbegin(), f_obj.cend(), thrust::device_pointer_cast(x_in), thrust::device_pointer_cast(x_out), ProxEvalF<T>(rho)); }