A Comparison Study on Implementing Optical Flow and Digital Communications on FPGAs and GPUs