minor fix, add openmp

This commit is contained in:
Tianqi Chen
2014-08-26 20:02:10 -07:00
parent 9d2c1cf9f5
commit 3e5cb25830
3 changed files with 3 additions and 2 deletions

View File

@@ -169,7 +169,7 @@ class SoftmaxMultiClassObj : public IObjFunction {
std::vector<bst_gpair> &gpair = *out_gpair;
gpair.resize(preds.size());
const unsigned nstep = static_cast<unsigned>(info.labels.size() * nclass);
const unsigned ndata = static_cast<bst_omp_uint>(preds.size() / nclass);
const bst_omp_uint ndata = static_cast<bst_omp_uint>(preds.size() / nclass);
#pragma omp parallel
{
std::vector<float> rec(nclass);