You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I originally implemented support for the outputIndices buffer, the encoding for the buffer had a hardcoded limit of 3 subscripts per variable. For variables without subscripts, this was wasteful, and for variables with more than 3 subscripts, it would throw an error. This also required extra care and communication between the runtime and the generated model code (see the indicesPerVariable and INDICES_PER_OUTPUT constants).
Now that we have the RunModelParams implementations and can test things more easily, this would be a good time to refactor the encoding/decoding to handle arbitrary numbers of subscripts.
We can change the format of the indices buffer to include the subscript count for each variable, and then include the minimum amount of subscript indices for each variable. The new encoding would look like this:
// variable count// varN index// varN subscript count// varN sub1 index// varN sub2 index// ...// varN subM index// ... (repeat for each var spec)
The text was updated successfully, but these errors were encountered:
When I originally implemented support for the
outputIndices
buffer, the encoding for the buffer had a hardcoded limit of 3 subscripts per variable. For variables without subscripts, this was wasteful, and for variables with more than 3 subscripts, it would throw an error. This also required extra care and communication between the runtime and the generated model code (see theindicesPerVariable
andINDICES_PER_OUTPUT
constants).Now that we have the
RunModelParams
implementations and can test things more easily, this would be a good time to refactor the encoding/decoding to handle arbitrary numbers of subscripts.We can change the format of the indices buffer to include the subscript count for each variable, and then include the minimum amount of subscript indices for each variable. The new encoding would look like this:
The text was updated successfully, but these errors were encountered: