Convolution algorithm implemented in different languages