You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you multiple LP types you will have to implement a mapping function.
This function takes an LP's global ID (gid) and returns an index within the type array.
This function has the prototype: tw_lpid tw_typemap_f (tw_lpid gid) and should be assigned to the g_tw_lp_typemap variable.
Note that the g_tw_lp_typemap has a default function assigned.
This function assumes that there is only one LP type and therefore always returns 0.
Model Use Case
This code shows how the phold model might take advantage of the new LP type functionality.
// this call must come first
tw_define_lps(nlp_per_pe, sizeof(phold_message), 0);
// existing type array called mylps
g_tw_lp_types = mylps;
tw_lp_setup_types();