Implementation of scalar product and finite input response in CUDA