void global_stat_destroy(gmx_global_stat_t gs) { destroy_bin(gs->rb); sfree(gs->itc0); sfree(gs->itc1); sfree(gs); }
void accumulate_u(t_commrec *cr, t_grpopts *opts, gmx_ekindata_t *ekind) { /* This routine will only be called when it's necessary */ t_bin *rb; int g; rb = mk_bin(); for (g = 0; (g < opts->ngacc); g++) { add_binr(rb, DIM, ekind->grpstat[g].u); } sum_bin(rb, cr); for (g = 0; (g < opts->ngacc); g++) { extract_binr(rb, DIM*g, DIM, ekind->grpstat[g].u); } destroy_bin(rb); }