chunkMaker Class Reference

#include <share_utils.h>

List of all members.

Public Member Functions

 chunkMaker (uint64 s_full_, uint64 s_chunk_)
uint64 nchunks () const
bool getNext (uint64 &start, uint64 &size)


Detailed Description

Helper class for dividing a range of work items into chunks of specified size.

Definition at line 60 of file share_utils.h.


Constructor & Destructor Documentation

chunkMaker::chunkMaker ( uint64  s_full_,
uint64  s_chunk_ 
) [inline]

Creates an object that produces chunk information for s_full_ work items and a desired chunk size of s_chunk_.

Note:
Both s_chunk_ and s_full_ must be larger than 0.

Definition at line 69 of file share_utils.h.


Member Function Documentation

uint64 chunkMaker::nchunks (  )  const [inline]

Returns the total number of chunks.

Definition at line 73 of file share_utils.h.

bool chunkMaker::getNext ( uint64 &  start,
uint64 &  size 
) [inline]

Returns the start index of the next chunk in start, and its size in size. If all chunks have been processed already, the return value is false, else true.

Definition at line 79 of file share_utils.h.


The documentation for this class was generated from the following file:

Generated on Thu Oct 8 14:48:51 2015 for LevelS C++ support library