feiwang3311 / Lantern

BSD 3-Clause "New" or "Revised" License
167 stars 15 forks source link

[NFC] Rename tensor properties. #13

Closed dan-zheng closed 5 years ago

dan-zheng commented 5 years ago

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.

dan-zheng commented 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?

feiwang3311 commented 5 years ago

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.

GSAir commented 5 years ago

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.

TiarkRompf commented 5 years ago

I agree with the renaming. It's good to use standard terminology.