Add parallel reduction to find mininum impurity