 
   return c0;
 }
-// Trilinear interpolation
+// Trilinear interpolation from the data texture
 __device__ float value_at_data(float3 pos){
   if(!inside(pos)){
     return 0;

}


unsigned char* grow_region_gpu_shared(unsigned char* data){
  unsigned char* region = (unsigned char*)calloc(sizeof(unsigned char), DATA_DIM*DATA_DIM*DATA_DIM);
  int* finished = (int*)malloc(sizeof(int));

}


// Each thread launched with this kernel will check if it is in a region border pixel. If it is
// it will run 40 iterations of the serial grow algorithm from the TA. Each block of the gpu will
// use a shared memory during the 40 iterations and syncronize with eachother when they are all done.
// TODO: This currently doesn't do anything. It should be fixed.
__global__ void region_grow_kernel_shared(unsigned char* data, unsigned char* region, int* finished){
  int x = blockIdx.x * blockDim.x + threadIdx.x;
  int y = blockIdx.y * blockDim.y + threadIdx.y;
