| 388 | } |
| 389 | |
| 390 | LGBM_SE LGBM_BoosterUpdateOneIterCustom_R(LGBM_SE handle, |
| 391 | LGBM_SE grad, |
| 392 | LGBM_SE hess, |
| 393 | LGBM_SE len, |
| 394 | LGBM_SE call_state) { |
| 395 | int is_finished = 0; |
| 396 | R_API_BEGIN(); |
| 397 | int int_len = R_AS_INT(len); |
| 398 | std::vector<float> tgrad(int_len), thess(int_len); |
| 399 | #pragma omp parallel for schedule(static) |
| 400 | for (int j = 0; j < int_len; ++j) { |
| 401 | tgrad[j] = static_cast<float>(R_REAL_PTR(grad)[j]); |
| 402 | thess[j] = static_cast<float>(R_REAL_PTR(hess)[j]); |
| 403 | } |
| 404 | CHECK_CALL(LGBM_BoosterUpdateOneIterCustom(R_GET_PTR(handle), tgrad.data(), thess.data(), &is_finished)); |
| 405 | R_API_END(); |
| 406 | } |
| 407 | |
| 408 | LGBM_SE LGBM_BoosterRollbackOneIter_R(LGBM_SE handle, |
| 409 | LGBM_SE call_state) { |
nothing calls this directly
no test coverage detected