Tuesday 15 September 2015

c++ - How to access chunk of memory from memory mapped file using boost? -


I'm trying to read a large file in X, Y, Z. Usually this data is played in GBs. I've created a memory map file using Boost. However, I'm still not clear how a piece of memory can be accessed from this file.

The Boost Function provides char * data () which gives an indicator to the byte of the first buffer. (I get complete data as buffer).
Is there any way by which I can read part of data from Chuck? Ideally, I want to read the data in 10,000 stories.

The following is the code.

  boost :: iostreams :: mapped_file_source file; Std :: string filename ("MyFile.pts"); Unsigned size = 58678952192; File.open (filename, size); Int Newbikes = Size * Size (Float) * 3; Cl_float3 * data = new cl_float3 [shape]; Float * tmp = (float *) file.data (); For (int i = 0; i    

Promotion: iostreams just behave like std :: basic_iostream We are unchanged IO Can use

  four buffer [10000]; File.read (Fond, 10000);    

No comments:

Post a Comment