zdevito/pytorch

THSize/THStride handling

zdevito opened this issue · 0 comments

THSize and THStride need to be some sort of iterable C++ object. Ideally it should be legal to pass a vector a {1,3,4}-style literal, and a begin(),end() pointer in this position.

The best thing may be to implement a very minimal version of LLVM's ArrayRef class, which has implicit constructors for std::vector, std::initializer and a constructor for begin()/end()

http://llvm.org/docs/doxygen/html/classllvm_1_1ArrayRef.htmla