Add `clamp()` implementation
This was originally from zoq()
; I added an OpenCL implementation, did some adaptation, and added tests. Technically this wasn't in the first release checklist in #20 (closed), but it was a part of the ens
branch and so it should get merged sooner or later anyway.
Instead of using mtOp
like Armadillo does, I just added a second aux_b
field to Op
, so that we can store both arguments to clamp()
. All Op
s should be optimized out by the compiler anyway, so it shouldn't matter if we add another member to it.