private static int calcElementIndexInBuffer(
        int positionWithinCycle,
        int cycleIndex,
        int cycleLengthLog2)
    {
        return (cycleIndex << cycleLengthLog2) + positionWithinCycle;
    }
Convert [position within cycle, cycleIndex] to index in buffer.
jctools-experimental/src/main/java/org/jctools/queues/MpscRelaxedArrayQueue.java