void adjoint_solve(const VectorIn& x, VectorOut& y) const { mtl::vampir_trace<5059> tracer; y.checked_change_resource(x); pc1.adjoint_solve(x, y); VectorOut &r= create_r(y), &d= create_d(y); r= x; r-= adjoint(A) * y; pc2.adjoint_solve(r, d); y+= d; }
Files* scan_position(Params_Template *p) { Device *position = create_d(SPEED,OTHER,p->axis,0); Devices *scan_ds = malloc(sizeof(Devices)); // If both axis exists. if(file_exists(position->path)) { scan_ds->num_ds = 1; scan_ds->ds = malloc(sizeof(Device*)*1); scan_ds->ds[0] = position; } else { scan_ds->num_ds = 0; scan_ds->ds = malloc(sizeof(Device*)); free_d(position); } Files *fs = create_fds(scan_ds); free_ds(scan_ds); return fs; }