This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ints in parallel code


Hi,
> All the ints in multiway*.h address sequences, i. e. the functions are
> limited to about 2^31 sequences.  The number of elements in these
> sequences can be much higher.
>
> In principle, you are right, the sequences are passed using iterators,
> and their difference could be 64 bits.  In practice, we are much further
> away from having more than 2^31 sequences, than having more than 2^31
> elements e. g. for sorting.
>   
Ok... Then, please help me summarizing the issue: if the user has a
"data set" of 2^34 alements, will it be automatically "split", ie,
processed, in chunks each < 2^31 elements?
> Anyway, do you want me to replace it with the appropriate
> difference_type?  It might have performance implications, though.
>   
In general, if you want my opinion, these days unless you have *very
clear* benchmarking numbers in front of you, it's always a very good
idea to use the correct types, to begin with: if the difference can need
64 bits to be represented, use a 64-bit type.

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]