let dr_allocate_vecptr m n =
let open Dense_real in
let open DR in
let p = gsl_vector_alloc (Unsigned.Size_t.of_int m) in
let y = !@ p in
let x = {
vsize = Int64.to_int (getf y vsize);
stride = Int64.to_int (getf y vsize);
vdata = (
let raw = getf y vdata in
bigarray_of_ptr array2 (m, n) Bigarray.float64 raw );
vptr = p } in x