Skip to contents

Reports whether the per-thread content-addressed exponential cache used by matExp()/indLin() solving actually served anything. The same numbers ride out of an rxSolve() as $counts$dadt (computed) and $counts$jac (reused), but a fit drives the solver directly and never builds that data frame, so this is the only way to observe the cache from inside one.

Usage

rxIndLinExpStats(reset = FALSE)

Arguments

reset

logical; when TRUE zero the counters after reading, so a measurement is one call before the work and one after

Value

named numeric vector: computed (exponentials actually exponentiated), reused (exponentials served from a cache slot), noSlot (the subset of computed that ran on a thread with no cache slot of its own, so it could not have hit – nonzero means the pool was never sized or is smaller than the thread team), and slots (the current pool size)

Details

The counters are cumulative until read with reset = TRUE, so a measurement is a reset before the work and a read after; a read that skips the reset blends the work with whatever warmed the counters earlier, which for a fit is its own setup solve. A nonzero noSlot condemns the run whatever reused says: those exponentials could not have hit.

Author

Matthew L. Fidler

Examples

rxIndLinExpStats()
#> computed   reused   noSlot    slots 
#>        0        0        0        4