17 #ifndef STXXL_PARALLEL_EQUALLY_SPLIT_HEADER
18 #define STXXL_PARALLEL_EQUALLY_SPLIT_HEADER
40 template <
typename DiffType,
typename DiffTypeOutputIterator>
42 DiffTypeOutputIterator s)
44 DiffType chunk_length = n / p,
split = n % p, start = 0;
48 start += ((DiffType)i < split) ? (chunk_length + 1) : chunk_length;
59 #endif // !STXXL_PARALLEL_EQUALLY_SPLIT_HEADER
DiffTypeOutputIterator equally_split(DiffType n, thread_index_t p, DiffTypeOutputIterator s)
Split a sequence into parts of almost equal size.
static std::vector< std::string > split(const std::string &str, const std::string &sep, unsigned int min_fields=0, unsigned int limit_fields=std::numeric_limits< unsigned int >::max())
Split a string by given separator string. Returns a vector of strings with at least min_fields and at...
#define STXXL_BEGIN_NAMESPACE
#define STXXL_END_NAMESPACE