unsigned Pulsar::Transposer::get_ndim (unsigned idim) { range_check (idim, "Pulsar::Transposer::get_ndim"); Dimensions dims (archive); return dims.get_ndim( dim[idim] ); }
Pulsar::Dimensions Pulsar::Transposer::get_stride (const Dimensions& d) const { int increment = 1; Dimensions stride; stride.set_ndim (dim[0], increment); increment *= d.get_ndim (dim[0]); stride.set_ndim (dim[1], increment); increment *= d.get_ndim (dim[1]); stride.set_ndim (dim[2], increment); increment *= d.get_ndim (dim[2]); stride.set_if_zero (increment); return stride; }