Yet Another eXchange Tool 0.11.1
Loading...
Searching...
No Matches
Classes | Functions
xt_idxmod.h File Reference
#include "xt/xt_core.h"
#include "xt/xt_idxlist.h"
Include dependency graph for xt_idxmod.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Xt_modifier
 

Functions

Xt_idxlist xt_idxmod_new (Xt_idxlist patch_idxlist, struct Xt_modifier *modifier, int modifier_num, int *mstate)
 generates a new index list based on an index list and a sequence of modifiers
 

Detailed Description

Author
Jörg Behrens behre.nosp@m.ns@d.nosp@m.krz.d.nosp@m.e Moritz Hanke hanke.nosp@m.@dkr.nosp@m.z.de Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de

Definition in file xt_idxmod.h.

Function Documentation

◆ xt_idxmod_new()

Xt_idxlist xt_idxmod_new ( Xt_idxlist  patch_idxlist,
struct Xt_modifier modifier,
int  modifier_num,
int *  mstate 
)

generates a new index list based on an index list and a sequence of modifiers

In the new index list all occurences of indices listed in the modifier extract list are replaced by respective indices of the modifier substitute list. Multiple modifiers are applied consecutively to the input index list. If a modification state array is given then it will be updated using the mask values in the used modifiers (OR operation). An update only affects indices that are modified by the respective modifier.

Parameters
[in]patch_idxlistinput index list
[in]modifierarray of modifiers
[in]modifier_numnumber of modifiers
[in,out]mstatemodification state
Returns
returns a Xt_idxlist
Remarks
For performance considerations imagine patch_idxlist as a (small) task-local index list whose transform into a vector scales ideally and the modifier idxlist-components as compact idxlists of global extent which should never downgrade to an elementwise index description.
mstate is not initilaized
mstate == NULL is valid (disables the modification state handling)
if mstate != NULL then it is required to be at least as big as the input index list (patch_idxlist)
Examples
idxlist_examples.c, and test_idxmod.c.

Definition at line 62 of file xt_idxmod.c.

Here is the call graph for this function:
Here is the caller graph for this function: