using a better structure to select and use the stencil kernel implementations