 
   __syncthreads();
 
-
   //#if (__CUDA_ARCH__ >= 300 )
   //  if ( tid < 32 )
   //  {

      problem_size = blocks_brent;
      threads = (problem_size < max_threads*2) ? nextPow2((problem_size + 1)/ 2) : max_threads;
      blocks_brent = (problem_size + (threads * 2 - 1)) / (threads * 2);
      reduceHessianGradient(problem_size,threads,blocks_brent,gradient_output_2,hessian_output_2,gradient_output,hessian_output);
      output_cache = 1;
    }
  }

  //get result
  if(output_cache = 1)
  {
    cudaMemcpy(hessian_array_host,hessian_output,kHessianTriagN*sizeof(float),cudaMemcpyDeviceToHost);
    cudaMemcpy(gradient_array_host,gradient_output,kJacobianSize*sizeof(float),cudaMemcpyDeviceToHost);

    {
      hessian_output_array[row*kJacobianSize + col] = hessian_output_array[col*kJacobianSize + row] =  hessian_array_host[index];
    }
  }

  for(unsigned int row = 0; row < kJacobianSize; ++row)
