     int threadCol = threadIdx.x;
     SharedMemory<T> shared;
     T* xTile = shared.getPointer();
-    //extern __shared__ double xTile[];
 
     __syncthreads();
     T sum = 0.0f;


      T * d_bottom_theta;


      dim3 dimBlock(BLOCK_SIZE);
      dim3 dimGrid(std::ceil((T)xin.rows() / (BLOCK_SIZE)));


        gradient(0) = h_sum;

        CUDA_CALL(cudaMalloc(&d_gradient, gradient.size() * sizeof(T)));
        CUDA_CALL(cudaMemcpy(d_gradient, &gradient(0), gradient.size() * sizeof(T),
          cudaMemcpyHostToDevice));

        calculateTheta<<< dimGrid, dimBlock>>>(d_gradient, d_theta, alpha/ y.size(), theta.size());

        CUDA_CALL(cudaMemcpy(&theta(0), d_theta, theta.size() * sizeof(T), cudaMemcpyDeviceToHost));
      }

      CUDA_CALL(cudaFree(d_xin));
