Implemented dot and gemv, it might work at least in dense tensor level...
Merged changes in NDIterator from Miles