CTYPESIZE Compute Size of C Struct
Section: FreeMat External Interface
Usage
Thectypesize
function is used to compute the size of a C structure
that is defined using the ctypedefine
function. The usage of
ctypesize
is
size = ctypesize('typename')
where typename
is the name of the C structure you want to compute
the size of. The returned count is measured in bytes. Note that as
indicated in the help for ctypedefine
that FreeMat does not
automatically pad the entries of the structure to match the particulars
of your C compiler. Instead, the assumption is that you have adequate
padding entries in your structure to align the FreeMat members with the
C ones. See ctypedefine
for more details. You can also specify
an optional count parameter if you want to determine how large multiple
structures are
size = ctypesize('typename',count)