Skip to content

Commit

Permalink
[Trifocal+P2Pt] wip memoization: builds but slower
Browse files Browse the repository at this point in the history
  • Loading branch information
rfabbri committed Nov 4, 2023
1 parent c11d132 commit 6c1a867
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions minus/minus.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,22 @@ memoize_HxH(C<F> __restrict *block, C<F> * __restrict memo /* constants */)
y[68]=y[81]=y[82]=y[95]=y[96]=y[109]=y[110]=y[124]=
y[125]=y[138]=y[139]=y[152]=y[153]=y[166]=y[167]=
y[180]=y[181]=y[194]=y[195]=0;

y[26] = yc[0];
y[40] = yc[1];
y[54] = yc[2];
y[69] = yc[3];
y[83] = yc[4];
y[97] = yc[5];
y[111] = yc[6];
y[123] = yc[7];
y[137] = yc[8];
y[151] = yc[9];
y[165] = yc[10];
y[179] = yc[11];
y[193] = yc[12];
y[207] = yc[13];
y[208] = yc[14];
y[209] = yc[15];
// y[26] = yc[0];
// y[40] = yc[1];
// y[54] = yc[2];
// y[69] = yc[3];
// y[83] = yc[4];
// y[97] = yc[5];
// y[111] = yc[6];
// y[123] = yc[7];
// y[137] = yc[8];
// y[151] = yc[9];
// y[165] = yc[10];
// y[179] = yc[11];
// y[193] = yc[12];
// y[207] = yc[13];
// y[208] = yc[14];
// y[209] = yc[15];
}

// THE MEAT //////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -202,7 +201,7 @@ track(const track_settings &s, const C<F> s_sols_u[f::nve*f::nsols], const C<F>
bool is_successful;
do {
++n_corr_steps;
// memoize_HxH<P,F>(HxH, ycHxH);
memoize_HxH<P,F>(HxH, ycHxH);
evaluate_HxH(x1t1, params, HxH);
lsolve<P,F>(AA, dx);
v::add_to_self(x1t1, dx);
Expand Down

0 comments on commit 6c1a867

Please sign in to comment.