<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">wow! from n^2 to n*p is not a trivial speedup then - assuming n is the sample size :)<div><div><br></div><div>Y</div><div><br><div><div>On Mar 20, 2014, at 00:02, Diego Fabregat <<a href="mailto:fabregat@aices.rwth-aachen.de">fabregat@aices.rwth-aachen.de</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
  
    <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
  
  <div bgcolor="#FFFFFF" text="#000000">
    From the log, it looks like by p I mean the width of XL (i.e.,
    intercept + covariates).<br>
    <br>
    <div class="moz-cite-prefix">On 03/19/2014 11:57 PM, Yurii Aulchenko
      wrote:<br>
    </div>
    <blockquote cite="mid:CAHX9t6+0SbQoY8fiKT-z1C+3uSath3zUr6nVm8Q5A+ujpTg_TQ@mail.gmail.com" type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <div dir="ltr">Deiego, what is the "p" (n^2 -> np) in the Log
        message?</div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Fri, Feb 7, 2014 at 6:32 PM, <span dir="ltr"><<a moz-do-not-send="true" href="mailto:noreply@r-forge.r-project.org" target="_blank">noreply@r-forge.r-project.org</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Author:
            dfabregat<br>
            Date: 2014-02-07 18:32:24 +0100 (Fri, 07 Feb 2014)<br>
            New Revision: 1600<br>
            <br>
            Modified:<br>
               pkg/OmicABEL/src/REML.c<br>
            Log:<br>
            Performance improvement for REML estimation.<br>
            Reusing precomputed data to replace an expensive<br>
            n^2 gemv for a cheaper n*p gemv.<br>
            <br>
            <br>
            Modified: pkg/OmicABEL/src/REML.c<br>
===================================================================<br>
            --- pkg/OmicABEL/src/REML.c     2014-02-06 21:29:08 UTC (rev
            1599)<br>
            +++ pkg/OmicABEL/src/REML.c     2014-02-07 17:32:24 UTC (rev
            1600)<br>
            @@ -194,10 +194,15 @@<br>
                    // loglik = a + b<br>
                    //  a -> log(det(M))<br>
                    //  b -> YmXB' inv(M) YmXB<br>
            -    dgemv_(TRANS,<br>
            +    /*dgemv_(TRANS,<br>
                         &n, &n,<br>
                         &ONE, Z, &n, YmXB, &iONE,<br>
            -            &ZERO, ZtY_upd, &iONE);<br>
            +            &ZERO, ZtY_upd, &iONE);*/<br>
            +    memcpy( ZtY_upd, ZtY, n * sizeof(double) );<br>
            +    dgemv_( NO_TRANS,<br>
            +            &n, &wXL,<br>
            +            &MINUS_ONE, ZtX, &n, beta, &iONE,<br>
            +            &ONE, ZtY_upd, &iONE );<br>
                    // YmXB' * inv( M ) * YmXB<br>
                    *loglik = 0.0;<br>
                    for (i = 0; i < n; i++ )<br>
            <br>
            _______________________________________________<br>
            Genabel-commits mailing list<br>
            <a moz-do-not-send="true" href="mailto:Genabel-commits@lists.r-forge.r-project.org">Genabel-commits@lists.r-forge.r-project.org</a><br>
            <a moz-do-not-send="true" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-commits" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-commits</a><br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        -----------------------------------------------------<br>
        Yurii S. Aulchenko<br>
        <div><br>
        </div>
        <div>[ <a moz-do-not-send="true" href="http://nl.linkedin.com/in/yuriiaulchenko" target="_blank">LinkedIn</a> ] [ <a moz-do-not-send="true" href="http://twitter.com/YuriiAulchenko" target="_blank">Twitter</a>
          ] [ <a moz-do-not-send="true" href="http://yurii-aulchenko.blogspot.nl/" target="_blank">Blog</a>
          ]</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
genabel-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:genabel-devel@lists.r-forge.r-project.org">genabel-devel@lists.r-forge.r-project.org</a>
<a class="moz-txt-link-freetext" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-devel">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-devel</a></pre>
    </blockquote>
    <br>
  </div>

</blockquote></div><br></div></div></body></html>