"CSizeT" (Compiled Type)
"CSizeT" (Compiled Type)
"CSizeT"
represents the C size_t type.
Details
- "CSizeT" is a macro that is replaced with a platform-specific concrete type. On most platforms, "CSizeT" is a macro for "UnsignedInteger64".
Examples
Basic Examples (3)
Compile a function that takes a "CSizeT" as input:
cf = FunctionCompile[Function[Typed[arg, "CSizeT"], arg]]cf[100]Compile a program that calls the C standard library function malloc on a size_t:
cf = FunctionCompile[Function[Typed[arg, "CSizeT"], Cast[LibraryFunction["malloc"][arg], "UnsignedInteger64", "BitCast"]]]cf[10]Create a constant with type "CSizeT":
cf = FunctionCompile[Function[{}, Typed[12, "CSizeT"]]]cf[]See Also
Compiled Types: UnsignedInteger64 CUnsignedLong CSSizeT
Tech Notes
Related Guides
History
Introduced in 2022 (13.1)