Can you or are there any plans for introducing real to integer conversion?

In my use case I’ve an array of pre-computed matrices: `matrix[20, 20] A_inv[10]`

. I would like to be able to choose a matrix like `A_inv[idx]`

, where `idx`

is calculated from real variables, eq `idx = to_integer(ceil(x/5.0))`

.

The reference manual 2.17 chapter 41.7 states: “The rounding functions cannot be used as indices to arrays because they return real values. Stan may introduce integer-valued versions of these in the future, but as of now, there is no good workaround.”