 
            
            
            
            
                7 Nov
                
                    2007
                
            
            
                7 Nov
                
                '07
                
            
            
            
        
    
                4:57 p.m.
            
        joelr1:
Is there such a thing as memory-mapped arrays in GHC?
I'm looking for something that would let me memory-map a file of floats and access it as an array.
There's a commented out mmapFile for ByteString in Data.ByteString's source. Use that, and then extract the ForeignPtr from the resulting ByteString, and castPtr it to a Ptr CFloat, then you're in business. -- Don