You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure this is a good idea; does this respect the block size and memory constraints of block processing? For example, if I defined something like this:
If seedClass() was smarter than it currently is and detected that the dgCMatrix at the core of y now has a colVars() method, the function would attempt to realize the dense matrix in the above example - not good. Fortunately, seedClass() is not very smart and returns DelayedUnaryIsoOpStack, which means that we always go through block processing. This means that either seedClass()'s lack of intelligence is intentional, in which case it seems like isPristine() will always be true at that point in the function and there is no point in the else expression; or it is meant to be more intelligent, in which case memory constraints are likely to be violated.
Why not just have a really simple rule:
if (isPristine(x)) {
candidate<- selectMethod("colVars", seed(x), optional=TRUE)
if (!is.null(candidate)) {
return(candidate(seed(x), ...)) # fill in the other arguments...
}
}
# block processing here.
The text was updated successfully, but these errors were encountered:
LTLA
added a commit
to LTLA/DelayedMatrixStats
that referenced
this issue
Sep 28, 2020
I noticed that
colVars
(and possibly other functions) has this little nugget:DelayedMatrixStats/R/colVars.R
Lines 71 to 74 in 670e46e
I'm not sure this is a good idea; does this respect the block size and memory constraints of block processing? For example, if I defined something like this:
If
seedClass()
was smarter than it currently is and detected that thedgCMatrix
at the core ofy
now has acolVars()
method, the function would attempt to realize the dense matrix in the above example - not good. Fortunately,seedClass()
is not very smart and returnsDelayedUnaryIsoOpStack
, which means that we always go through block processing. This means that eitherseedClass()
's lack of intelligence is intentional, in which case it seems likeisPristine()
will always be true at that point in the function and there is no point in theelse
expression; or it is meant to be more intelligent, in which case memory constraints are likely to be violated.Why not just have a really simple rule:
The text was updated successfully, but these errors were encountered: