Adding support for dtypes in stencil, fixing opencl bug for 3d stencils.