     // vv[k] is a thread variable, so sum it over the warp threads
 #pragma unroll
     for (int k = 0; k < REPTREES; k++) {
-      if (vv[k] != fneg_infty) {            // This is a leaf node, dont do anything (leaf marker will be output)
+      ftmp = vv[k];
+      if (*((int *)&ftmp) != NEG_INFINITY) {            // This is a leaf node, dont do anything (leaf marker will be output)
 #pragma unroll
         for (int i = 1; i < 32; i *= 2) {
           vv[k] += __shfl_down(vv[k], i);

  __shared__ int pos[REPTREES][ATHREADS];
  __shared__ float totals[REPTREES][ATHREADS];
  int bd, tind, ttop;
  int neg_infty = NEG_INFINITY;
  float fneg_infty = *((float *)&neg_infty);
  float vv[REPTREES];
  


      // check thresholds and save as needed
      __syncthreads();
      if (threadIdx.x + threadIdx.y*ATHREADS < ntrees) {
        ftmp = thresh[threadIdx.y][threadIdx.x];
        if (*((int *)&ftmp) != NEG_INFINITY) {  // Check if non-leaf
          newt = 2 * pos[threadIdx.y][threadIdx.x] + 1;
          if (totals[threadIdx.y][threadIdx.x] > thresh[threadIdx.y][threadIdx.x]) {
            newt++;
