functional clamping with OCL stencil