 
   if (THC_canUse32BitIndexMath(state, tensor) &&
       THC_canUse32BitIndexMath(state, index)) {
-    SimpleTensorInfo<unsigned int> tensorInfo(state, tensor);
-    SimpleTensorInfo<unsigned int> indexInfo(state, index);
+    TensorInfo<unsigned int> tensorInfo(state, tensor, NoCollapseDims);
+    TensorInfo<unsigned int> indexInfo(state, index, NoCollapseDims);
 
     // Specialize for a small number of dimensions.
     switch (indexInfo.dims) {

        break;
    }
  } else {
    SimpleTensorInfo<unsigned long> tensorInfo(state, tensor);
    SimpleTensorInfo<unsigned long> srcInfo(state, src);
    SimpleTensorInfo<unsigned long> indexInfo(state, index);

    RUN(unsigned long, -1)
  }

#include "THCTensorMath.h"
#include "THCGeneral.h"
#include "THCApply.cuh"


// Compute the offsets into the given tensors for a linear index. For the 't2'
