simplified pairwise_pyopencl