octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58926] Octave gives wrong results with intel-


From: Archisman Panigrahi
Subject: [Octave-bug-tracker] [bug #58926] Octave gives wrong results with intel-mkl when diagonalizing large matrices
Date: Tue, 11 Aug 2020 02:06:27 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0

Follow-up Comment #9, bug #58926 (project octave):


[comment #7 comment #7:]
> BTW, independent of the BLAS and OMP question, you can speed up the rest of
your code with vectorization:
> 
> 
> octave:21> clear a b c d
> octave:22> tic; for a = 1:500, for b = 1:500, c(a,b) = sin(a + b^2); endfor;
endfor; toc
> Elapsed time is 0.85335 seconds.
> octave:23> tic; d = sin((1:500)' + (1:500).^2); toc
> Elapsed time is 0.00294185 seconds.
> octave:24> assert(all(all(c==d)))
> octave:25> 
> 
> 
> It's roughly 290 times faster to avoid the for-loops in this case (853 ms vs
3 ms).

Thank you, I did not know about this technique.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58926>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]