I have a general performance question. I’m working on a fluid solver. With many steps in the solver (e.g. advection), a number of variables are updated based on their previous values and the values of some common variables (i.e. the velocity field). Typically, updating each variable requires some unique texture lookups but also many lookups shared by updates to other variables.
In such a scenario, is it better to update each variable in its own kernel (and thus have many redundant texture lookups) or is it better to combine everything into one big kernel (and risk additional cache misses)?