block boundaries for central difference problem

Im looking at a central difference problem when U(i,t+1)=U(i-1,t)+U(i+1,t). I can’t quite figure out how to code the problem for the boundaries of a block. Is the only option to go for texture memory? Help

Well it depends completely on how you want to have your boundaries done. What should be happening on the edges of your domain, according to the algorithm/solving method?

Hi BIG_Mac. Sorry that I didn’t make my point clear im talking about when I write the kernal for my code Im dealing with a block of threads. To compute the new values I need (blocksize +2) values due to the fact a central difference problem needs the values for the two cells that are either side of the block.