Closed dan-zheng closed 5 years ago
@feiwang3311 I'm curious about the purpose/meaning of def dims = TTT(dimsSeq)
(I'm using the old variable names).
What does TTT
accomplish? How should I decide whether to use dimsSeq
or dims
?
Thanks, Dan. That is good suggestion. As to TTT, Greg put it there and it doesn't seem to provide anything more than dimsSeq. In most cases I just use dims.
The TTT was added as a debugging tool. It was to be able to intercept call to apply in the Seq in order to do range checking. For some reason I couldn't get the StackTrace otherwise if I recall correctly. It can be removed. Or we should create a proper object that take an input of dimensions and have some function that can help with the strides and direct access in the Array.
I agree with the renaming. It's good to use standard terminology.
Use established terms-of-art for tensor properties.
I don't mean to get caught up in bikeshedding, but I believe the established terms are a bit easier to understand and more usable.
dims
->shape
nbDims
->rank
nbElem
->scalarCount