_kernel FDTD (global struct , global struct )
      
      
     ⋯
      
      ⋯
       while do
       #pragma unroll
       for do
     #pragma unroll
     for     do
          
          
          ⋯;
     end
   end
   #pragma unroll
   for do
     #pragma unroll
     for      do
       
       
       ⋯;
     end
   end
   ;
   ⋯;
   ;
   ⋯;
   #pragma unroll
   for   do
     //compute the temporary storage locations
      1:
      2:
     ⋯
     //Computation of the core data
     
     ⋯
     //Computation of the boundary data
      
     ⋯
     if then
         if    then
           ;
          ⋯;
          ;
          ⋯
         else
          ;
          ⋯
         end
      end
   end
   ;
    end
end
Algorithm 1: Pseudo code of the stencil computation kernel.