C++ implementation of IRLS algorithm for generalized linear model