[GenABEL-dev] [Genabel-commits] r1088 - pkg/MixABEL/src/MXlib
Yurii Aulchenko
yurii.aulchenko at gmail.com
Wed Jan 30 04:16:38 CET 2013
Just curious - did it stop working because GSL changed?
Yurii
On Mon, Jan 28, 2013 at 3:32 AM, <noreply at r-forge.r-project.org> wrote:
> Author: wja
> Date: 2013-01-27 21:32:44 +0100 (Sun, 27 Jan 2013)
> New Revision: 1088
>
> Modified:
> pkg/MixABEL/src/MXlib/moorepenrose.cpp
> pkg/MixABEL/src/MXlib/twovarcomp.cpp
> Log:
> Fixed bug #2449. Addresses of temporaries (submatrix/vector views) were
> being taken
>
> Modified: pkg/MixABEL/src/MXlib/moorepenrose.cpp
> ===================================================================
> --- pkg/MixABEL/src/MXlib/moorepenrose.cpp 2013-01-18 19:37:08 UTC
> (rev 1087)
> +++ pkg/MixABEL/src/MXlib/moorepenrose.cpp 2013-01-27 20:32:44 UTC
> (rev 1088)
> @@ -57,12 +57,15 @@
> return GSL_SUCCESS;
> }
> for(it=0;it<thresh;it++)
> -
> gsl_vector_scale(&(gsl_matrix_column(psvd_V_mat,it).vector),1.0/gsl_vector_get(psvd_S_vec,it));
> -
> + {
> + gsl_vector_view columnview = gsl_matrix_column(psvd_V_mat,it);
> +
> gsl_vector_scale(&(columnview.vector),1.0/gsl_vector_get(psvd_S_vec,it));
> + }
> pUrest_mat=gsl_matrix_alloc(pA_mat->size1, thresh);
> -
> gsl_matrix_memcpy(pUrest_mat,&(gsl_matrix_submatrix(pA_mat,0,0,pA_mat->size1,
> thresh).matrix));
> +
> + gsl_matrix_view sub_mat =
> gsl_matrix_submatrix(pA_mat,0,0,pA_mat->size1, thresh);
> + gsl_matrix_memcpy(pUrest_mat,(&sub_mat.matrix));
>
> -
> svd_Vrest_matview=gsl_matrix_submatrix(psvd_V_mat, 0, 0,
> pA_mat->size1, thresh);
>
> gsl_blas_dgemm(CblasNoTrans, CblasTrans, 1.0,
> &(svd_Vrest_matview.matrix), pUrest_mat,0.0, pA_mat);
>
> Modified: pkg/MixABEL/src/MXlib/twovarcomp.cpp
> ===================================================================
> --- pkg/MixABEL/src/MXlib/twovarcomp.cpp 2013-01-18 19:37:08 UTC
> (rev 1087)
> +++ pkg/MixABEL/src/MXlib/twovarcomp.cpp 2013-01-27 20:32:44 UTC
> (rev 1088)
> @@ -675,8 +675,10 @@
>
> gsl_matrix_memcpy(pdev_work->pa_mat, ppRvPx_mat[pdev_work->k]);
> for(pdev_work->it=0;pdev_work->it<n;pdev_work->it++)
> -
> gsl_vector_scale(&(gsl_matrix_row(pdev_work->pa_mat,pdev_work->it).vector),
> gsl_vector_get(pdev_work->pa2_vec,pdev_work->it));
> -
> + {
> + gsl_vector_view
> rowview=gsl_matrix_row(pdev_work->pa_mat,pdev_work->it);
> + gsl_vector_scale(&rowview.vector,
> gsl_vector_get(pdev_work->pa2_vec,pdev_work->it));
> + }
> gsl_vector_memcpy(pdev_work->pxPhiy_vec, ppxPVPy_vec[pdev_work->k]);
> gsl_matrix_memcpy(pdev_work->pxPhix_mat, ppxPVPx_mat[pdev_work->k]);
>
> @@ -851,8 +853,10 @@
> gsl_matrix_memcpy(pdev_work->pa_mat, ppRvPx_mat[pdev_work->k]);
>
> for(pdev_work->it=0;pdev_work->it<n;pdev_work->it++)
> -
> gsl_vector_scale(&(gsl_matrix_row(pdev_work->pa_mat,pdev_work->it).vector),
> gsl_vector_get(pdev_work->pa2_vec,pdev_work->it));
> -
> + {
> + gsl_vector_view rowview;
> + gsl_vector_scale(&(rowview.vector),
> gsl_vector_get(pdev_work->pa2_vec,pdev_work->it));
> + }
>
> gsl_vector_memcpy(pdev_work->pxPhiy_vec, ppxPVPy_vec[pdev_work->k]);
> gsl_matrix_memcpy(pdev_work->pxPhix_mat, ppxPVPx_mat[pdev_work->k]);
>
> _______________________________________________
> Genabel-commits mailing list
> Genabel-commits at lists.r-forge.r-project.org
>
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-commits
>
--
-----------------------------------------------------
Yurii S. Aulchenko
[ LinkedIn <http://nl.linkedin.com/in/yuriiaulchenko> ] [
Twitter<http://twitter.com/YuriiAulchenko>] [
Blog <http://yurii-aulchenko.blogspot.nl/> ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/genabel-devel/attachments/20130130/bc2593dc/attachment.html>
More information about the genabel-devel
mailing list