add defs to compute strides and nd indices