-
Notifications
You must be signed in to change notification settings - Fork 5
Introduction to static strides and static extents for static Tensor
Introduction to static strides
and static extents
is one step closer to making static Tensor which will make Tensor more efficient.
static_extents
It helps you to create extents at compile and runtime as you can create whole extents at compile time or create extents at runtime or mix of both but with compile time rank so you cannot change the rank afterwards if you want dynamic rank then choose basic_extents
.
template<classT, ptrdiff_t R, ptrdiff_t ...E>
struct static_extents;
template<ptrdiff_t R, ptrdiff_t... E>
using shape; // selects if you want to use basic_extents or static_extents
static_strides
It helps you to create strides at compile using static_extents
template <class ExtentType, class Layout>
struct static_strides;
template <class E, class Layout>
struct stride_type; // selects if you want to use basic_strides or static_strides
/**
* ....
* @tparam E type of basic_extents or static_extents defaulted to shape<dynamic_rank>
* ....
*/
template<class T, class E, class F, class A>
class tensor;
auto t1 = tensor<int>{}; // tensor with dynamic extents and dynamic strides
auto t2 = tensor<int,shape<4>>{1,2,3,4}; // tensor with static rank but dynamic extents and static_strides
auto t3 = tensor<int,shape<4,1,dynamic_extent,dynamic_extent,4>>{2,3}; // tensor with static rank, mix of dynamic extents and static extents and static strides
auto t3 = tensor<int,shape<4,1,2,3,4>>{}; // tensor with static_rank, static extents and static_strides
We both would like to thank our mentor Cem for his constant support and help in achieving our goals. We always find him helpful and he was always easy to reach for help or discussion regarding the work. We would also like to thank Google for the Google Summer of Code Programme, without which all these wouldn't be possible. Lastly, we express our gratitude to our parents for helping and providing us with all the indirect or direct needs for carrying out our work nicely in our homes.
- Home
- Project Proposal
- Milestones and Tasks
- Implementation
- Documentation
- Discussions
- Examples
- Experimental features
- Project Proposal
- Milestones and Tasks
- Implementation
- Documentation
- Discussions
- Example Code