Explore chapters and articles related to this topic
Introduction
Published in Randall L. Eubank, Ana Kupresanin, Statistical Computing in C++ and R, 2011
Randall L. Eubank, Ana Kupresanin
The real power of C++ relative to C stems from its flexibility in defining new, user-created, data types. To a certain extent this facility existed in C through the ability to create a data structure or struct. Basically, a struct was an aggregate of various data types that could include a mix of arrays, character strings, integers, other structs, etc. The components of a struct were called members
C Programming
Published in Paul W. Ross, The Handbook of Software for Engineers and Scientists, 2018
Like an array, a structure is a collection of data. It differs from an array in two ways. First, a structure can contain items of data that are not all the same type. Second, the components of a structure, i.e., fields, are referred to by name rather than through an index. A structure is declared with the keyword “struct” as shown in the following Figure 13.15.
Holistic modeling and analysis of multistage manufacturing processes with sparse effective inputs and mixed profile outputs
Published in IISE Transactions, 2021
Note that the structure of describes the general data structure for the intermediate product quality data generated from an MMP of multiple data types and their dimensions. This structure is similar to a C struct or MATLAB® cell: the data generated from all stages are of different dimensions. If the size of matrices are the same, can be seen as tensor data (Yue et al., 2020). We assume that the data generated from all stages have different structures, in the sense that they may represent either images or functional curves, so that special considerations in data analytics are required. Finally, we note that in other applications, the process outputs can be even more complicated. For example, the data from each stage may include multiple images of different sizes, groups of functional curves of different sizes, or other structured data types such as spatial measurements or point clouds. It will become clear in Section 3.4 that the methodology proposed in this article can potentially be extended to such scenarios.
Detecting all potential null dereferences based on points-to property sound analysis
Published in International Journal of Computers and Applications, 2020
For different types of memory objects, different types of regions are applied. PrimitiveRegion describes primitive type memory object, PointerRegion describes pointer, ArrayRegion describes array, and StructRegion describes struct, and each region has the only number. For the region dynamically allocated memory, its number is mxm_i_n (x means the type of the region, the value is ‘b’, ‘p’, ‘a’ or ‘s’) (for describe simply in this paper, we define as the number of the region dynamically allocated), n is bytes of memory size. The number of null address is ‘null’, and the number of wild address is ‘wild’. If the initial letter of the number of a region is ‘u’ or ‘g’, this region describes a parameter or global variable.
A usability case study of algorithmic differentiation tools on the ISSM ice sheet model
Published in Optimization Methods and Software, 2018
Alexander Hück, Christian Bischof, Max Sagebaum, Nicolas R. Gauger, Benjamin Jurgelucks, Eric Larour, Gilberto Perez
ADOL-C requires the function to have a specific signature, i.e. int ext_f(int n, double* x, int m, double* y). Here, x is the input array and y is the output array. It gets registered by calling the function reg_ext_fct(ext_f) which puts a pointer of the external function on the tape and returns a struct. The struct holds a reference to the external function and contains further member pointers to functions that compute the desired derivative of ext_f, e.g. fos_reverse for the first-order RM. These have to be provided by the user and, again, have a specific signature given by ADOL-C. In Figure 1, we show a code excerpt which creates an external function on the ADOL-C tape during the forward evaluation. During the tape evaluation of ADOL-C, it invokes the previously set fos_reverse pointer to generate the required adjoint value at the appropriate tape location.