 
 	//Need pieces of information:
 	//sum(2:2:base) (matlabese) of triangle (tA)
-	//base of triangle (tB)
+	//base of triangle (tB)  Ok we'll use 2D
 
-	REAL temper[tA];
+	REAL temper[tB][tB/2];
 
 	int gid = blockDim.x * blockIdx.x + threadIdx.x; //Global Thread ID
 	int tid = threadIdx.x; //Warp or node ID

	int itr2 = 18;
	//k needs to insert the relevant left right values around the computed values
	//every timestep.  Since it grows larger the loop is reversed.
	for (int k = 17; k>1; k--)
	{
		// This tells you if the current row is the first or second.
		shft_wr = (k & 1);
		// Read and write are opposite rows.
		shft_rd = 34*((shft_wr+1) & 1);

		//Block 0 is split so it needs a different algorithm.  This algorithm
		//is slightly different than top triangle as described in the note above.
		if (blockIdx.x > 0)
		{
			if (tid <= (33-k) && tid >= (k-2))
			{
				temper[tid + 1 + (34*shft_wr)] = fo * (temper[tid+shft_rd] + temper[tid+shft_rd+2]) + (1-2.*fo) * temper[tid+shft_rd+1];
			}

		}

		//Split part.  This exhibits thread divergence and is suboptimal.
		//So it's ripe to be improved.

		else
		{
			if (tid <= (33-k) && tid >= (k-2))
			{
				if (tid == 15)
				{
					temper[tid + 1 + (34*shft_wr)] = 2. * fo * (temper[tid+shft_rd]-temper[tid+shft_rd+1]) + temper[tid+shft_rd+1];
				}
				else if (tid == 16)
				{
					temper[tid + 1 + (34*shft_wr)] = 2. * fo * (temper[tid+shft_rd+2]-temper[tid+shft_rd+1]) + temper[tid+shft_rd+1];
				}
				else
				{
					temper[tid + 1 + (34*shft_wr)] = fo * (temper[tid+shft_rd] + temper[tid+shft_rd+2]) + (1-2.*fo) * temper[tid+shft_rd+1];
				}
			}

		}


	#pragma unroll
	for (int k = 0; k<tB; k++)
	{
		temper[0][k] = (IC[gid*tB+k]);
	}

	//Global to global or register to global?
	right[gid*tB] = IC[gid*tB];
	right[gid*tB+1] = IC[gid*tB+1];
	left[gid*tB] = IC[ ((gid+1) * tB) - 2];
	left[gid*tB+1] = IC[ ((gid+1) * tB) - 1];

	//The initial conditions are timeslice 0 so start k at 1.
	#pragma unroll
	for (int k = 1; k<tB/2; k++)
	{

		for(int n = k; n < (tB-k); n++)
		{
		//Each iteration the triangle narrows.  When k = 1, 30 points are
		//computed, k = 2, 28 points.
			temper[k][n] = fo * (temper[k-1][n+1]  + temper[k-1][n-1] ) + (1-2.*fo) * temper[k-1][n];
		}

		// Global memory version
		// Index math is kinda out of contol.
		right[gid*tB+2*k] = temper[k][k];
		right[gid*tB+(2*k+1)] = temper[k][k+1];
		left[gid*tB+2*k] =  temper[k][tB-k-1];
		left[gid*tB+(2*k+1)] =  temper[k][tB-k-2];

	}

	// Ok, let's use shfl next time

}

