File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1305,8 +1305,17 @@ namespace GPBoost {
13051305 pred_var = vec_t (num_data_pred_cli);
13061306#pragma omp parallel for schedule(static)
13071307 for (int i = 0 ; i < num_data_pred_cli; ++i) {
1308- pred_var[i] = (Z_p_B_inv_D.row (i)).dot (Z_p_B_inv.row (i)) - (M_aux.row (i)).dot (ZpSigmaZoT.row (i));
1308+ vec_t v1 = Z_p_B_inv_D.row (i);
1309+ vec_t v2 = Z_p_B_inv.row (i);
1310+ vec_t v3 = M_aux.row (i);
1311+ vec_t v4 = ZpSigmaZoT.row (i);
1312+ pred_var[i] = v1.dot (v2) - (v3.dot (v4));
13091313 }
1314+ // the following code does not run correctly on some compilers
1315+ // #pragma omp parallel for schedule(static)
1316+ // for (int i = 0; i < num_data_pred_cli; ++i) {
1317+ // pred_var[i] = (Z_p_B_inv_D.row(i)).dot(Z_p_B_inv.row(i)) - (M_aux.row(i)).dot(ZpSigmaZoT.row(i));
1318+ // }
13101319 if (predict_response) {
13111320 pred_var.array () += 1 .;
13121321 }
You can’t perform that action at this time.
0 commit comments