= CIVL Libraries In progress. == bundle Header: [https://vsl.cis.udel.edu/trac/civl/browser/CIVL/trunk/mods/dev.civl.abc/src/include/headers/bundle.cvh bundle.cvh]. Uses: [#op op]. A bundle is a sequence of objects of the same type, wrapped into an atomic package. A bundle is created using a function that specifies a region of memory. One can create a bundle from an array of integers, and another bundle from an array of reals. Both bundles have the same type, `$bundle`. They can therefore be entered into an array of `$bundle`, for example. Hence bundles are useful for mixing objects of different (even statically unknown) types into a single data structure. Later, the contents of a bundle can be extracted with another function that specifies a region of memory into which to unpack the bundle; if that memory does not have the right type to receive the contents of the bundle, a runtime error occurs. === Types * `$bundle`: the bundle type === Functions * `$system int $bundle_size($bundle b)` * Returns the size of the given bundle, i.e., the number of bytes consumed by all elements of the bundle. This is the product of the number of elements and the size of one element. * `$system $bundle $bundle_pack(void *ptr, int size)` * This function creates a bundle from the memory region specified by `ptr` and `size` (the total number of bytes to copy), copying the data into the new bundle. It returns the new bundle. * `$system void $bundle_unpack($bundle b, void *ptr)` * This function copies the data from the given bundle into the memory region starting at `ptr`. The memory region extends for `$bundle_size(b)` bytes. * `$atomic_f void $bundle_unpack_apply($bundle data, void *buf, $operation op, int count, void *result)` * This function unpacks the bundle and applies the specified operation on the contents of the bundle. For every binary operation defined in operation, the content of the bundle will be used as the left operand and `buf` will be used as the right operand. The result of the operation is stored in `buf`. Parameter `count` is the number of elements in the bundle; `buf` should point to a region of memory with at these last many elements of the same type. == comm [https://vsl.cis.udel.edu/trac/civl/browser/CIVL/trunk/mods/dev.civl.abc/src/include/headers/comm.cvh comm.cvh] == concurrency == domain == mem == op #op Defines an enumerated type `$operation` with the following values: ||= Constant =||= Description =|| ||`_NO_OP` ||no operation || ||`_MAX` ||maximum || ||`_MIN` ||minimun || ||`_SUM` ||sum || ||`_PROD` ||product || ||`_LAND` ||logical and || ||`_BAND` ||bit-wise and || ||`_LOR` ||logical or || ||`_BOR` ||bit-wise or || ||`_LXOR` ||logical exclusive or || ||`_BXOR` ||bit-wise exclusive or || ||`_MINLOC` ||min value and location || ||`_MAXLOC` ||max value and location || ||`_EQ` ||equal to || ||`_NEQ` ||not Equal to || == pointer == scope == seq == C Standard library === stdlib === stdio === string