pass strides as template parameter for marginal speed up