private void alloc_(int h, int w) { total = h * w; data = new byte[total]; dims[0] = h; dims[1] = w; }