const of subview model in intrepid2
Created by: bathmatt
@eric-c-cyr @kyungjoo-kim @rppawlo I tested some of the kokkos refactor branch in intrepid2. I was looking at the serial getValues inside of a kokkos parallel_for. Here is a simple code
` struct foo{ DynRankView in, out; foo(DynRankView in_,DynRankView out_):in(in_),out(out_){} KOKKOS_INLINE_FUNCTION void operator ()(int i)const { typedef Basis_HGRAD_TRI_C1_FEM Basis; Basis::SerialIntrepid2::OPERATOR_VALUE::getValues(subview(out,i,ALL()), subview(in,i,ALL())); } };
`
and a hard coded version
void operator ()(int i)const { out(i,0) = 1. - in(i,0) - in(1,1); out(i,1) = in(i,0); out(i,2) = in(i,1); }
Now when I call this with 10M length view on a single core it takes 0.09s, if I skip the subview step and hard code the response it takes 0.03s
From that I'm assuming that the subview creation is roughly 0.06s of the run time.
This is lower than i assumed it would be, but still 70% of the cost. Not suggesting we fix this today, but we may want to in the future.