title: Is it possible to dynamically point which Cuda 3DSurface use
body: <p>The project concerns fluid simulation which is simulated using 3D grid (stencil simulation).</p>
  
  <p>In each step I am reading values from one surface, computing and saving to second surface. The thing is that in each step the pointer to surfaces need to be swapped (in first iteration I want to Read from 1-st surface, write to 2nd, in second iteration I want to read from 2nd surface, write to 1st and so on). Is it possible to do it in a dynamic way? Now I am using some if-clause.</p>
  
  <p>For example if it was 2D simulation I could use 2DlayeredSurface with two layers and there I could point which surface to use, but unfortunately 3DlayeredSurface does not exist.</p>
  
  <p>Is it possible to create an array of  type and then point it by index ?</p>