// author: Michele Martone // description: gather/scatter // Part 1: applies only to allocate.c #include "tests/gadget_match.cocci" @gather_per_type_soa_functions@ identifier new_prtcl_str_id.id1; identifier prtcl_str.id; fresh identifier soa_gather_fid="soa_gather__"##id1; symbol first; @@ ++ void soa_gather_fid(struct id*P_aos, const struct id1 P_soa, size_t first, size_t N) ++ { ++ size_t i; ++ if(P_aos==NULL) return; //happens. e.g. in runs with gravity only SphP does not exist ++ for(i=first;i