Caffe does not use hamming_distance; indirectly, this function limits portability via __builtin__popcount.
In #3402 I offer a solution to the compatibility issue.
@ronghanghu suggested that hamming_distance may be removed. @longjon , @bhack would you agree that this might be removed?
@kloudkl clearly some work went into this; would you favour removing this function from Caffe?