[vector] #27: Zero out an unboxed array
vector
vector at projects.haskell.org
Sun Apr 17 18:17:46 BST 2011
#27: Zero out an unboxed array
------------------------+---------------------------------------------------
Reporter: jbapple | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: 0.8
Version: 0.6 | Resolution:
Keywords: |
------------------------+---------------------------------------------------
Comment(by LouisWasserman):
Here's my solution, based on something I actually saw in a job interview.
Since we can't reliably use memset, since that only works for things that
can be replicated one byte at a time, use O(log n) memcpy's to copy the
correct value to increasing segments of the array.
--
Ticket URL: <http://trac.haskell.org/vector/ticket/27#comment:3>
vector <http://trac.haskell.org/vector>
Package vector
More information about the vector
mailing list