(bind-func vcopy_pack
"take a sparse double* buffer and copy it into a packed representation"
(lambda (src:double* dest:double* stride neighbors srclen)
(doloop (i srclen)
(doloop (j neighbors)
(pset! dest (+ (* neighbors i) j) (pref src (+ (* stride i) j)))))))