etmc/tmLQCD — Issue #60: square_norm question
Author: kostrzewa
Created: 2012-02-01 18:23:11+00:00
State: open
Labels: Discussion

I don't really understand what's going on in the linalg/square_norm function (at least the unoptimized one). It seems to me like there are four empty operations taking place.

At the third iteration of the loop we have:

tr = ds_3
ts = ds_1 + ds_2 + ds_3
tt = ds_3
ks = ds_1 + ds_2 + ds_3
kc = 0

Since all the variables are overwritten from one call to the next I presume they were declared static for performance purposes rather than data persistence, so I don't really know why the additions and subtractions are carried out and then discarded.