logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Mat_VarGetStructs — Index a structure variable using slices of each dimension

Description

       The Mat_VarGetStructs() function selects a subarray from a structure array matvar. Each of  the  elements
       in  the  subarray contains all of the fields of the structure.  The index of each dimension starts at the
       start element in the array (0 being the first element), and reads every  stride  values  (1  being  every
       element, 2 every other element, etc.). The total number of elements in the subarray is specified as edge.
       The  copy_fields  option  specifies  whether  the fields of the original structure are copied for the new
       subarray.  If set to 0, the returned structure array's fields have  the  same  pointer  as  the  original
       array,  and  the  data  field of the subarray structure.  The subarray is marked with the conserve memory
       flag indicating that the fields should not be free'd.  They are free'd when  the  original  structure  is
       free'd.

Name

       Mat_VarGetStructs — Index a structure variable using slices of each dimension

Return Values

       A subarray of the original structure array, or NULL if there is an error.

See Also

Mat_VarGetStructsLinear(3)

Debian                                          November 20, 2023                           MAT_VARGETSTRUCTS(3)

Synopsis

#include<matio.h>matvar_t*Mat_VarGetStructs(constmatvar_t*matvar,     consint*start,     constint*stride,    constint*edge,
           intcopy_fields);

See Also