inner_prod() and norm_X() functions now use context-aware temporaries.