Modularizing stereo BP