diff options
author | Alberto Ruiz <aruiz@um.es> | 2008-06-03 09:00:37 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2008-06-03 09:00:37 +0000 |
commit | d0fde9bdcb7cf490f7b067f0fa4d15b4f8fc3a61 (patch) | |
tree | 41ccf852f51c403d0dbe9d87aba4612604a31155 /lib/Data/Packed/Internal | |
parent | f2d385ab680809e08e7c73c70e996284e05eae8c (diff) |
Data.Packed.Convert
Diffstat (limited to 'lib/Data/Packed/Internal')
-rw-r--r-- | lib/Data/Packed/Internal/Vector.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Data/Packed/Internal/Vector.hs b/lib/Data/Packed/Internal/Vector.hs index 5a42f9d..772aafd 100644 --- a/lib/Data/Packed/Internal/Vector.hs +++ b/lib/Data/Packed/Internal/Vector.hs | |||
@@ -166,3 +166,12 @@ updateVector k h (v@V {dim=n}) | |||
166 | >> return 0 | 166 | >> return 0 |
167 | app2 f vec v vec r "updateVector" | 167 | app2 f vec v vec r "updateVector" |
168 | return r | 168 | return r |
169 | |||
170 | ----------------------------------------------------------------- | ||
171 | |||
172 | cloneVector :: Storable t => Vector t -> IO (Vector t) | ||
173 | cloneVector (v@V {dim=n}) = do | ||
174 | r <- createVector n | ||
175 | let f _ s _ d = copyArray d s n >> return 0 | ||
176 | app2 f vec v vec r "cloneVector" | ||
177 | return r | ||