 
   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) {


  static __device__ void compute(
      IndexType linearId, const int dim,
      const SimpleTensorInfo<IndexType>& index, IndexType* indexOffset,
      const SimpleTensorInfo<IndexType>& t2, IndexType* t2Offset) {
    for (int d = index.dims - 1; d >= 0; d--) {
      IndexType curDimIndex = linearId % index.sizes[d];
      *indexOffset += curDimIndex * index.strides[d];

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

    RUN(unsigned long, -1)
  }
