     }
   }
 
-  __device__ const ptrdiff_t* get() const {
+  __device__ const index_t& get() const {
     return index_;
   }
 };

    return strides_;
  }

  __device__ T& operator[](const int* idx) {
    char* ptr = reinterpret_cast<char*>(data_);
    for (int dim = 0; dim < ndim; ++dim) {
      ptr += static_cast<ptrdiff_t>(strides_[dim]) * idx[dim];

    return NULL;
  }

  template <typename U>
  __device__ T& operator[](const U&) {
    return *data_;
  }

  template <typename U>
  __device__ T operator[](const U&) const {
    return *data_;
  }
};

