CPP codes for AOSOLogitBoost (single thread)