Hi, I have a large array of contiguous memory in double, which I don't want to copy to a real_1d_array to save memory. Also moving (std::move) it is not an option as I want to keep the original array for further processing. Is it possible to create a real_1D_array with the original array pointer to double?
I did some fiddling with the code and modified setcontent to have p_vec to point to pContent ( p_vec->ptr.p_double = const_cast<double *> (pContent);), which seems to work. But this is really a hack and I am not convinced it does not have side effects in other parts of the library.
Thank you in advance for any help! Max
|