compute_residual
-
Array<cfloat, 3> compas::compute_residual(CudaContext ctx, Array<cfloat, 3> lhs, Array<cfloat, 3> rhs, float *objective_out = nullptr)
Returns the result of
lhs - rhs
.Additionally, if
objective_out
is provided, this function writes the sum over the squares of the differences betweenlhs
andrhs
toobjective_out
.- Parameters:
ctx – CUDA context.
lhs – The left-hand side.
rhs – The right-hand side.
objective_out – Optionally, pointer to where the sum over the squares of the differences must be stored.
- Returns: