BoostGSoC19/tensor

Adding static strides to tensor

Closed this issue · 0 comments

static_stride is way to create stride for static_extents at compile time and has similar apis as current implementation basic_strides
ex:

  1. static_stride<static_extents<4,1,2,3,4>,first_order> creates the stride with column major arrangement
  2. static_stride<static_extents<4,1,2,3,4>,last_order> creates the stride with row major arrangement

function Members (Public)

  1. at returns the element at given pos
  2. rank and size returns the number of extents
  3. product returns the product of every extents
  4. stride returns the stride of a give pos
  5. operator() overloaded and gives the stride for indices provided

function Members (Private)

  1. access helper function for getting strides for given indices

For more info on layout click on the url https://eli.thegreenplace.net/2015/memory-layout-of-multi-dimensional-arrays

Path: https://github.com/BoostGSoC19/tensor/blob/framework/include/boost/numeric/ublas/tensor/static_strides.hpp