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

varray.itemsize(dtype) returns the bytes-per-element for any varray data type without needing to construct an array. It accepts a string in the same syntax used by other dtype-aware APIs:

varray.itemsize('cint32')          % 8
varray.itemsize('fi(1,32,0)')      % 4
varray.itemsize('cfi(0,17,0)')     % 8   (rounded up to power-of-two bytes per part)
varray.itemsize('mx9')             % 18  (bytes per 16-value block)

For mx4/mx6/mx9 the return value is bytes per 16-value block, matching the itemsize property on an instance. Unknown strings raise the "Input is not a valid varray data type." error.