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

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

[Octave-bug-tracker] [bug #54183] Cache NaN/Inf status of matrix for per


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #54183] Cache NaN/Inf status of matrix for performance?
Date: Mon, 25 Jun 2018 15:16:03 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #1, bug #54183 (project octave):

Could we combine both?

In some cases, I think we already check the matrix type for things like
symmetry.  So if we are doing that anyway, we could also check for Inf or NaN
values.

In other cases, we might only want to check the matrix type if it is already
set (rather than computing anything prior to a BLAS operation) and then try
the BLAS operation.  If it fails, then try to determine why, or possibly do
the more expensive checks for matrix type and NaN or Inf elements.  At that
point, we can set the return value appropriately and also modify the matrix
type info of the original matrix.

I should also note that one thing I don't like about the current matrix type
calculation and caching is that it relies on mutable data and that can cause
unpredictable behavior if the compiler optimizes based on assumptions of
constness.  So we may need to be careful about how these checks are handled.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?54183>

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




reply via email to

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