adds clamping for CPU version of convolution