Modularize CPU/GPU optical flow engines.