 
 
 __global__ void cunnx_SoftMaxTree_updateGradInput_kernel(
-  float *gradInput, float* logsoftOutput, float *gradOutput, float* weight,
-  float *target, float* childParent, float* parentChildren, 
+  float *gradInput, float *logsoftOutput, float *gradOutput, float* weight,
+  float *target, float *childParent, float *parentChildren, 
   int nInput, int rootId, int maxFamilyPath)
 {
   //__shared__ float input_buffer[nInput]; // constant might be faster

  int k = blockIdx.x;
  float *input_k = input + k*nInput;
  float *nodeGradOutput, *nodeGradWeight, *nodeGradBias;
  int childId = target[k] - 1;
  int parentId, parentIdx, childIdx, nChildren;
  float *node;
  int n = 0;
  THIntTensor *node;
  
  // loop through nodes
  while(1)

}

__global__ void cunnx_SoftMaxTree_accGradParameters_kernel(
  float *gradWeight, float *gradBias, float *input, 
  float *linearGradOutput, float *nodeUpdateCuda, float *target, 
  float *childParent, float *parentChildren, 
  int nInput, int rootId, int maxFamilyPath, int maxDept, float scale)
{
  __shared__ float buffer[SOFTMAXTREE_THREADS+1];
  int tx = threadIdx.x;
