FZJ-JSC / JuML

3 stars 1 forks source link

Offer pointer + dims constructor for datasets #40

Open Markus-Goetz opened 8 years ago

Markus-Goetz commented 8 years ago

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

cbodenst commented 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.

Markus-Goetz commented 8 years ago

Because of other applications that have raw pointers. Does not take us much to implement or are there any concerns?