Computing Byte Width - Computing Byte Width - 2026.1 English - UG1864

Vitis Functional Simulation User Guide (UG1864)

Document_ID
UG1864
Release_Date
2026-06-23
Version
2026.1 English

va.itemsize(dtype) returns the bytes-per-element for any varray data type without needing to allocate an array. It accepts a string (the same syntax used with dtype=) or a dtype class:

va.itemsize("cint32")              # 8
va.itemsize("fi(1, 32, 0)")        # 4
va.itemsize("cfi(0, 17, 0)")       # 8   (rounded up to power-of-two bytes per part)
va.itemsize("axis(cint32, 8, 5, 6)")  # 8   (axis wrapper transparent)
va.itemsize("mx9")                 # 18  (bytes per 16-value block)
va.itemsize(va.cdouble)            # 16

For mx4/mx6/mx9 the return value is bytes per 16-value block, matching va.mx*.itemsize. Unknown strings raise ValueError.