Algorithms and Framework for Computing 2-body Statistics on Graphics Processing Units