[OpenMP] Use simple VLA implementation to replace uses of actual VLA

Use of VLA can cause compile warning that was introduced in D156565. This patch
implements a simple stack/heap-based VLA that can miminc the behavior of an
actual VLA and prevent the warning. By default the stack accomodates the
elements. If the number of emelements is greater than N, which by default is 8,
a heap buffer will be allocated and used to acccomodate the elements.

GitOrigin-RevId: a4d1d5f5b54b2f93d7290588734f59ff24fc515c
3 files changed