pairwise hsum calculation using c++ function, 'tabMergePw'