 												point_gradients + valid_points_num * 9,
 												point_gradients + valid_points_num * 15,
 												point_gradients + valid_points_num * 4,
-												point_gradients + valid_points_num * 10,
+												point_gradients + valid_points_num * 10);
+	checkCudaErrors(cudaGetLastError());
+
+	computePointGradients1<<<grid_x, block_x>>>(x_, y_, z_, points_number_,
+												valid_points, valid_points_num,
+												dj_ang_.buffer(),
 												point_gradients + valid_points_num * 16,
 												point_gradients + valid_points_num * 5,
 												point_gradients + valid_points_num * 11,

}

/* First step of computing point gradients */
__global__ void computePointGradients(float *x, float *y, float *z, int points_num,
													int *valid_points, int valid_points_num,
													double *dj_ang,
													double *pg00, double *pg11, double *pg22,
													double *pg13, double *pg23, double *pg04, double *pg14,
													double *pg24, double *pg05, double *pg15, double *pg25)
{
	int id = threadIdx.x + blockIdx.x * blockDim.x;
	int stride = blockDim.x * gridDim.x;
	__shared__ double j_ang[24];


	if (threadIdx.x < 24) {
		j_ang[threadIdx.x] = dj_ang[threadIdx.x];
	}


	}
}

void GNormalDistributionsTransform::setInputTarget(pcl::PointXYZI *input, int size)
{
	// Copy input map data from the host memory to the GPU memory
	GRegistration::setInputTarget(input, size);

	// Build the voxel grid
	if (target_points_number_ != 0) {
		voxel_grid_.setLeafSize(resolution_, resolution_, resolution_);
		voxel_grid_.setInput(target_x_, target_y_, target_z_, target_points_number_);
	}
}

void GNormalDistributionsTransform::setInputTarget(pcl::PointXYZ *input, int size)
{
	// Copy input map data from the host memory to the GPU memory
	GRegistration::setInputTarget(input, size);

	// Build the voxel grid
	if (target_points_number_ != 0) {
		voxel_grid_.setLeafSize(resolution_, resolution_, resolution_);
		voxel_grid_.setInput(target_x_, target_y_, target_z_, target_points_number_);
	}
}

void GNormalDistributionsTransform::computeTransformation(const Eigen::Matrix<float, 4, 4> &guess)
{

