Open Markus-Goetz opened 8 years ago
For which purpose? Should this copy the data? I would suggest to implement a Dataset(const af::array&) constructor which copies the data.
Because of other applications that have raw pointers. Does not take us much to implement or are there any concerns?
E.g.:
float* data = new float[100]; for (int i = 0; i < 100; ++i) data[i] = (float) i; Dataset d(data, dim_t(100, 1, 1, 1));