'Create a tensor the right size for histogram data, with memory allocated
in the contiguous histogram buffer. Track it by tag for later reference.'

def _hist_tensor(self, tag):

    assert (self.hist_idx < self.hist_max)
    hist_buf = (int(self.hist_base) + ((self.hist_idx * self.hist_bins) * 4))
    self.hist_map[tag] = self.hist_idx
    self.hist_idx += 1
    return GPUTensor(self, shape=(1, self.hist_bins), dtype=np.int32, gpudata=hist_buf, name=tag)
