22#include " ../thread_pool.h"
33#include " importance_samplers.h"
44#include " resamplers.h"
5- #include " ../Rconfig-wrap.h"
6-
7- extern " C" {
8- void F77_NAME (dsyr)(
9- const char *uplo, const int *n, const double *alpha,
10- const double *x, const int *incx,
11- double *a, const int *lda FCLEN);
12- }
135
146constexpr static char C_U = ' U' ;
157constexpr static int I_ONE = 1L ;
@@ -220,9 +212,9 @@ derivs_output get_derivs_output
220212 if (!only_score){
221213 const double dd =
222214 dat.family ->dd_log_like (dat.y [i], trunc_eta, dat.dts [i]);
223- F77_CALL ( dsyr) (
215+ R_BLAS_LAPACK:: dsyr (
224216 &C_U, &dfixd, &dd, dat.X .colptr (i), &I_ONE, hess_terms.memptr (),
225- &score_dim FCONE );
217+ &score_dim);
226218 }
227219 }
228220 }
@@ -467,9 +459,9 @@ score_n_hess_O_N_sq::score_n_hess_O_N_sq(
467459 if (!only_score){
468460 const double dd =
469461 dat.family ->dd_log_like (dat.y [i], trunc_eta, dat.dts [i]);
470- F77_CALL ( dsyr) (
462+ R_BLAS_LAPACK:: dsyr (
471463 &C_U, &dfixd, &dd, dat.X .colptr (i), &I_ONE, hess_terms.memptr (),
472- &score_dim FCONE );
464+ &score_dim);
473465 }
474466 }
475467 }
@@ -531,9 +523,9 @@ score_n_hess_O_N_sq::score_n_hess_O_N_sq(
531523
532524 /* add outer product of score terms from this pair */
533525 score_terms (obs_span) += obs_score_term;
534- F77_CALL ( dsyr) (
526+ R_BLAS_LAPACK:: dsyr (
535527 &C_U, &score_dim, &w_i, score_terms.memptr (), &I_ONE,
536- hess_terms.memptr (), &score_dim FCONE );
528+ hess_terms.memptr (), &score_dim);
537529
538530 if (!is_first_it)
539531 hess_terms += w_i * old_res->get_hess_terms ();
@@ -543,9 +535,9 @@ score_n_hess_O_N_sq::score_n_hess_O_N_sq(
543535
544536 if (!only_score){
545537 /* subtract outer product of score */
546- F77_CALL ( dsyr) (
538+ R_BLAS_LAPACK:: dsyr (
547539 &C_U, &score_dim, &D_NEG_ONE, score.memptr (), &I_ONE, hess_terms.memptr (),
548- &score_dim FCONE );
540+ &score_dim);
549541
550542 /* not needed as we later copy the upper part to the lower part */
551543 // hess_terms = arma::symmatu(hess_terms);
0 commit comments