* [v3] parallel mode use cstdint
@ 2008-02-15 20:48 Benjamin Kosnik
2008-02-16 10:28 ` Benjamin Kosnik
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Kosnik @ 2008-02-15 20:48 UTC (permalink / raw)
To: libstdc++, gcc-patches; +Cc: singler
[-- Attachment #1: Type: text/plain, Size: 539 bytes --]
First in a series of 3 patches fixing parallel mode settings. This was
originally posted as part of libstdc++/34797: I'm breaking it into
three pieces and posting individually.
This patch uses stdint's int64_t instead of the current
__gnu_parallel::int64, et. al. By doing this, we have consistent type
usage across C/C++, with the downside of having std::tr1 injected when
using parallel mode. I think the removal of "sound alike" typedefs
outweighs the (slight) disadvantage.
-benjamin
tested x86/linux
tested x86/linux parallel mode
[-- Attachment #2: p.20080215-1 --]
[-- Type: text/plain, Size: 20892 bytes --]
2008-02-15 Benjamin Kosnik <bkoz@redhat.com>
* include/parallel/types.h: Move enum parallelism here. Use
tr1/cstdint's int16_t, uint16_t, int32_t, uint32_t, int64_t,
uint64_t.
* include/parallel/multiseq_selection.h: Adjust for cstdint.
* include/parallel/compatibility.h: Same.
* include/parallel/tags.h: Just compile-time tags.
* include/parallel/base.h: Put namespace bits here.
* src/Makefile.am (PARALLEL_FLAGS): Use it.
* src/Makefile.in: Regenerate.
* testsuite/25_algorithms/nth_element/1.cc: Add test variable.
Index: src/parallel_list.cc
===================================================================
--- src/parallel_list.cc (revision 132352)
+++ src/parallel_list.cc (working copy)
@@ -27,6 +27,4 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#define _GLIBCXX_PARALLEL
-
#include "list.cc"
Index: include/parallel/types.h
===================================================================
--- include/parallel/types.h (revision 132352)
+++ include/parallel/types.h (working copy)
@@ -29,7 +29,7 @@
// Public License.
/** @file parallel/types.h
- * @brief Basic typedefs.
+ * @brief Basic types and typedefs.
* This file is a GNU parallel extension to the Standard C++ Library.
*/
@@ -39,51 +39,120 @@
#define _GLIBCXX_PARALLEL_TYPES_H 1
#include <cstdlib>
+#include <tr1/cstdint>
namespace __gnu_parallel
{
- // XXX need to use <cstdint>
- /** @brief 8-bit signed integer. */
- typedef char int8;
+ // Enumerated types.
- /** @brief 8-bit unsigned integer. */
- typedef unsigned char uint8;
+ /// @brief Run-time equivalents for the compile-time tags.
+ enum parallelism
+ {
+ /// Not parallel.
+ sequential,
- /** @brief 16-bit signed integer. */
- typedef short int16;
+ /// Parallel unbalanced (equal-sized chunks).
+ parallel_unbalanced,
- /** @brief 16-bit unsigned integer. */
- typedef unsigned short uint16;
+ /// Parallel balanced (work-stealing).
+ parallel_balanced,
- /** @brief 32-bit signed integer. */
- typedef int int32;
+ /// Parallel with OpenMP dynamic load-balancing.
+ parallel_omp_loop,
- /** @brief 32-bit unsigned integer. */
- typedef unsigned int uint32;
+ /// Parallel with OpenMP static load-balancing.
+ parallel_omp_loop_static,
- /** @brief 64-bit signed integer. */
- typedef long long int64;
+ /// Parallel with OpenMP taskqueue construct.
+ parallel_taskqueue
+ };
- /** @brief 64-bit unsigned integer. */
- typedef unsigned long long uint64;
+ inline bool
+ is_parallel(const parallelism __p) { return __p != sequential; }
+ /// @brief Sorting algorithms: multi-way mergesort, quicksort,
+ /// load-balanced quicksort.
+ enum SortAlgorithm
+ {
+ MWMS,
+ QS,
+ QS_BALANCED
+ };
+
+ /// @brief Merging algorithms: bubblesort-alike, loser-tree
+ /// variants, enum sentinel.
+ enum MultiwayMergeAlgorithm
+ {
+ BUBBLE,
+ LOSER_TREE_EXPLICIT,
+ LOSER_TREE,
+ LOSER_TREE_COMBINED,
+ LOSER_TREE_SENTINEL,
+ MWM_ALGORITHM_LAST
+ };
+
+ /// @brief Partial sum algorithms: recursive, linear.
+ enum PartialSumAlgorithm
+ {
+ RECURSIVE,
+ LINEAR
+ };
+
+ /// @brief Splitting strategies for sorting/merging: sampling, exact.
+ enum Splitting
+ {
+ SAMPLING,
+ EXACT
+ };
+
+ /// @brief Find distribution strategies: growing blocks, equal-sized
+ /// blocks, equal splitting.
+ enum FindDistribution
+ {
+ GROWING_BLOCKS,
+ CONSTANT_SIZE_BLOCKS,
+ EQUAL_SPLIT
+ };
+
+ /// @brief Strategies for run-time algorithm selection:
+ /// force_sequential, force_parallel, heuristic.
+ enum AlgorithmSelection
+ {
+ heuristic,
+ force_sequential,
+ force_parallel
+ };
+
+
+ /// Integer Types.
+ using std::tr1::int16_t;
+ using std::tr1::uint16_t;
+
+ using std::tr1::int32_t;
+ using std::tr1::uint32_t;
+
+ using std::tr1::int64_t;
+ using std::tr1::uint64_t;
+
/**
* @brief Unsigned integer to index elements.
* The total number of elements for each algorithm must fit into this type.
*/
- typedef uint64 sequence_index_t;
+ typedef uint64_t sequence_index_t;
/**
* @brief Unsigned integer to index a thread number.
* The maximum thread number (for each processor) must fit into this type.
*/
- typedef uint16 thread_index_t;
+ typedef uint16_t thread_index_t;
+ // XXX atomics interface?
/**
* @brief Longest compare-and-swappable integer type on this platform.
*/
- typedef int64 lcas_t;
+ typedef int64_t lcas_t;
+ // XXX numeric_limits::digits?
/**
* @brief Number of bits of ::lcas_t.
*/
@@ -92,7 +161,7 @@
/**
* @brief ::lcas_t with the right half of bits set to 1.
*/
- static const lcas_t lcas_t_mask = (((lcas_t)1 << (lcas_t_bits / 2)) - 1);
+ static const lcas_t lcas_t_mask = ((lcas_t(1) << (lcas_t_bits / 2)) - 1);
}
#endif /* _GLIBCXX_TYPES_H */
Index: include/parallel/multiseq_selection.h
===================================================================
--- include/parallel/multiseq_selection.h (revision 132352)
+++ include/parallel/multiseq_selection.h (working copy)
@@ -67,7 +67,6 @@
public:
lexicographic(Comparator& _comp) : comp(_comp) { }
- // XXX const
bool
operator()(const std::pair<T1, T2>& p1,
const std::pair<T1, T2>& p2) const
@@ -265,7 +264,7 @@
}
difference_type skew = static_cast<difference_type>
- (static_cast<uint64>(total) * rank / N - leftsize);
+ (static_cast<uint64_t>(total) * rank / N - leftsize);
if (skew > 0)
{
Index: include/parallel/base.h
===================================================================
--- include/parallel/base.h (revision 132352)
+++ include/parallel/base.h (working copy)
@@ -44,8 +44,39 @@
#include <parallel/parallel.h>
#include <cstdio>
+
+// Parallel mode namespaces.
+namespace std
+{
+ namespace __parallel { }
+}
+
+/**
+ * @namespace __gnu_parallel
+ * @brief GNU parallel classes for public use.
+ */
namespace __gnu_parallel
{
+ // Import all the parallel versions of components in namespace std.
+ using namespace std::__parallel;
+}
+
+/**
+ * @namespace __gnu_sequential
+ * @brief GNU sequential classes for public use.
+ */
+namespace __gnu_sequential
+{
+#ifdef _GLIBCXX_PARALLEL
+ using namespace std::__norm;
+#else
+ using namespace std;
+#endif
+}
+
+
+namespace __gnu_parallel
+{
// XXX remove std::duplicates from here if possible,
// XXX but keep minimal dependencies.
@@ -357,8 +388,8 @@
public:
typedef _DifferenceTp difference_type;
- // Better case down to uint64, than up to _DifferenceTp.
- typedef pseudo_sequence_iterator<T, uint64> iterator;
+ // Better case down to uint64_t, than up to _DifferenceTp.
+ typedef pseudo_sequence_iterator<T, uint64_t> iterator;
/** @brief Constructor.
* @param val Element of the sequence.
@@ -437,8 +468,8 @@
#define _GLIBCXX_PARALLEL_ASSERT(_Condition) \
do \
{ \
- if (!(_Condition)) \
- __gnu_parallel::__replacement_assert(__FILE__, __LINE__, \
+ if (!(_Condition)) \
+ __gnu_parallel::__replacement_assert(__FILE__, __LINE__, \
__PRETTY_FUNCTION__, #_Condition); \
} while (false)
Index: include/parallel/random_shuffle.h
===================================================================
--- include/parallel/random_shuffle.h (revision 132352)
+++ include/parallel/random_shuffle.h (working copy)
@@ -106,7 +106,7 @@
bin_index bins_end;
/** @brief Random seed for this thread. */
- uint32 seed;
+ uint32_t seed;
/** @brief Pointer to global data. */
DRandomShufflingGlobalData<RandomAccessIterator>* sd;
@@ -368,7 +368,7 @@
for (; j < bin_cursor; ++j)
sd.bin_proc[j] = i;
pus[i].num_threads = num_threads;
- pus[i].seed = rng(std::numeric_limits<uint32>::max());
+ pus[i].seed = rng(std::numeric_limits<uint32_t>::max());
pus[i].sd = &sd;
}
starts[num_threads] = start;
Index: include/parallel/tags.h
===================================================================
--- include/parallel/tags.h (revision 132352)
+++ include/parallel/tags.h (working copy)
@@ -30,7 +30,7 @@
/**
* @file parallel/tags.h
- * @brief Tags for compile-time options.
+ * @brief Tags for compile-time selection.
* This file is a GNU parallel extension to the Standard C++ Library.
*/
@@ -39,59 +39,8 @@
#ifndef _GLIBCXX_PARALLEL_TAGS_H
#define _GLIBCXX_PARALLEL_TAGS_H 1
-// Parallel mode namespaces.
-namespace std
-{
- namespace __parallel { }
-}
-
-/**
- * @namespace __gnu_sequential
- * @brief GNU sequential classes for public use.
- */
-namespace __gnu_sequential
-{
-#ifdef _GLIBCXX_PARALLEL
- using namespace std::__norm;
-#else
- using namespace std;
-#endif
-}
-
-/**
- * @namespace __gnu_parallel
- * @brief GNU parallel classes for public use.
- */
namespace __gnu_parallel
{
- // Import all the parallel versions of components in namespace std.
- using namespace std::__parallel;
-
- enum parallelism
- {
- /// Not parallel.
- sequential,
-
- /// Parallel unbalanced (equal-sized chunks).
- parallel_unbalanced,
-
- /// Parallel balanced (work-stealing).
- parallel_balanced,
-
- /// Parallel with OpenMP dynamic load-balancing.
- parallel_omp_loop,
-
- /// Parallel with OpenMP static load-balancing.
- parallel_omp_loop_static,
-
- /// Parallel with OpenMP taskqueue construct.
- parallel_taskqueue
- };
-
- inline bool
- is_parallel(const parallelism __p) { return __p != sequential; }
-
-
/** @brief Forces sequential execution at compile time. */
struct sequential_tag { };
@@ -115,6 +64,7 @@
struct omp_loop_static_tag : public parallel_tag { };
+ // XXX settings.h Settings::FindDistribution
/** @brief Selects the growing block size variant for std::find().
@see _GLIBCXX_FIND_GROWING_BLOCKS */
struct growing_blocks_tag { };
Index: include/parallel/compatibility.h
===================================================================
--- include/parallel/compatibility.h (revision 132352)
+++ include/parallel/compatibility.h (working copy)
@@ -68,7 +68,7 @@
{
#if defined(__ICC)
template<typename must_be_int = int>
- int32 faa32(int32* x, int32 inc)
+ int32_t faa32(int32_t* x, int32_t inc)
{
asm volatile("lock xadd %0,%1"
: "=r" (inc), "=m" (*x)
@@ -78,7 +78,7 @@
}
#if defined(__x86_64)
template<typename must_be_int = int>
- int64 faa64(int64* x, int64 inc)
+ int64_t faa64(int64_t* x, int64_t inc)
{
asm volatile("lock xadd %0,%1"
: "=r" (inc), "=m" (*x)
@@ -97,8 +97,8 @@
* @param ptr Pointer to a 32-bit signed integer.
* @param addend Value to add.
*/
- inline int32
- fetch_and_add_32(volatile int32* ptr, int32 addend)
+ inline int32_t
+ fetch_and_add_32(volatile int32_t* ptr, int32_t addend)
{
#if defined(__ICC) //x86 version
return _InterlockedExchangeAdd((void*)ptr, addend);
@@ -110,7 +110,7 @@
#elif defined(__GNUC__)
return __sync_fetch_and_add(ptr, addend);
#elif defined(__SUNPRO_CC) && defined(__sparc)
- volatile int32 before, after;
+ volatile int32_t before, after;
do
{
before = *ptr;
@@ -120,7 +120,7 @@
return before;
#else //fallback, slow
#pragma message("slow fetch_and_add_32")
- int32 res;
+ int32_t res;
#pragma omp critical
{
res = *ptr;
@@ -136,11 +136,11 @@
* @param ptr Pointer to a 64-bit signed integer.
* @param addend Value to add.
*/
- inline int64
- fetch_and_add_64(volatile int64* ptr, int64 addend)
+ inline int64_t
+ fetch_and_add_64(volatile int64_t* ptr, int64_t addend)
{
#if defined(__ICC) && defined(__x86_64) //x86 version
- return faa64<int>((int64*)ptr, addend);
+ return faa64<int>((int64_t*)ptr, addend);
#elif defined(__ECC) //IA-64 version
return _InterlockedExchangeAdd64((void*)ptr, addend);
#elif defined(__ICL) || defined(_MSC_VER)
@@ -156,7 +156,7 @@
(defined(__i686) || defined(__pentium4) || defined(__athlon))
return __sync_fetch_and_add(ptr, addend);
#elif defined(__SUNPRO_CC) && defined(__sparc)
- volatile int64 before, after;
+ volatile int64_t before, after;
do
{
before = *ptr;
@@ -170,7 +170,7 @@
//#warning "please compile with -march=i686 or better"
#endif
#pragma message("slow fetch_and_add_64")
- int64 res;
+ int64_t res;
#pragma omp critical
{
res = *ptr;
@@ -190,10 +190,10 @@
inline T
fetch_and_add(volatile T* ptr, T addend)
{
- if (sizeof(T) == sizeof(int32))
- return (T)fetch_and_add_32((volatile int32*) ptr, (int32)addend);
- else if (sizeof(T) == sizeof(int64))
- return (T)fetch_and_add_64((volatile int64*) ptr, (int64)addend);
+ if (sizeof(T) == sizeof(int32_t))
+ return (T)fetch_and_add_32((volatile int32_t*) ptr, (int32_t)addend);
+ else if (sizeof(T) == sizeof(int64_t))
+ return (T)fetch_and_add_64((volatile int64_t*) ptr, (int64_t)addend);
else
_GLIBCXX_PARALLEL_ASSERT(false);
}
@@ -202,10 +202,10 @@
#if defined(__ICC)
template<typename must_be_int = int>
- inline int32
- cas32(volatile int32* ptr, int32 old, int32 nw)
+ inline int32_t
+ cas32(volatile int32_t* ptr, int32_t old, int32_t nw)
{
- int32 before;
+ int32_t before;
__asm__ __volatile__("lock; cmpxchgl %1,%2"
: "=a"(before)
: "q"(nw), "m"(*(volatile long long*)(ptr)), "0"(old)
@@ -215,10 +215,10 @@
#if defined(__x86_64)
template<typename must_be_int = int>
- inline int64
- cas64(volatile int64 *ptr, int64 old, int64 nw)
+ inline int64_t
+ cas64(volatile int64_t *ptr, int64_t old, int64_t nw)
{
- int64 before;
+ int64_t before;
__asm__ __volatile__("lock; cmpxchgq %1,%2"
: "=a"(before)
: "q"(nw), "m"(*(volatile long long*)(ptr)), "0"(old)
@@ -238,7 +238,7 @@
* @param replacement Replacement value.
*/
inline bool
- compare_and_swap_32(volatile int32* ptr, int32 comparand, int32 replacement)
+ compare_and_swap_32(volatile int32_t* ptr, int32_t comparand, int32_t replacement)
{
#if defined(__ICC) //x86 version
return _InterlockedCompareExchange((void*)ptr, replacement,
@@ -278,7 +278,7 @@
* @param replacement Replacement value.
*/
inline bool
- compare_and_swap_64(volatile int64* ptr, int64 comparand, int64 replacement)
+ compare_and_swap_64(volatile int64_t* ptr, int64_t comparand, int64_t replacement)
{
#if defined(__ICC) && defined(__x86_64) //x86 version
return cas64<int>(ptr, comparand, replacement) == comparand;
@@ -332,12 +332,10 @@
inline bool
compare_and_swap(volatile T* ptr, T comparand, T replacement)
{
- if (sizeof(T) == sizeof(int32))
- return compare_and_swap_32((volatile int32*) ptr,
- (int32)comparand, (int32)replacement);
- else if (sizeof(T) == sizeof(int64))
- return compare_and_swap_64((volatile int64*) ptr,
- (int64)comparand, (int64)replacement);
+ if (sizeof(T) == sizeof(int32_t))
+ return compare_and_swap_32((volatile int32_t*) ptr, (int32_t)comparand, (int32_t)replacement);
+ else if (sizeof(T) == sizeof(int64_t))
+ return compare_and_swap_64((volatile int64_t*) ptr, (int64_t)comparand, (int64_t)replacement);
else
_GLIBCXX_PARALLEL_ASSERT(false);
}
Index: include/parallel/random_number.h
===================================================================
--- include/parallel/random_number.h (revision 132352)
+++ include/parallel/random_number.h (working copy)
@@ -330,11 +330,11 @@
}
- typedef mersenne_twister<uint32,32,351,175,19,0xccab8ee7,11,
+ typedef mersenne_twister<uint32_t,32,351,175,19,0xccab8ee7,11,
7,0x31b6ab00,15,0xffe50000,17, 0xa37d3c92> mt11213b;
// validation by experiment from mt19937.c
- typedef mersenne_twister<uint32,32,624,397,31,0x9908b0df,11,
+ typedef mersenne_twister<uint32_t,32,624,397,31,0x9908b0df,11,
7,0x9d2c5680,15,0xefc60000,18, 3346425566U> mt19937;
/** @brief Random number generator, based on the Mersenne twister. */
@@ -342,24 +342,24 @@
{
private:
mt19937 mt;
- uint64 supremum, RAND_SUP;
+ uint64_t supremum, RAND_SUP;
double supremum_reciprocal, RAND_SUP_REC;
- uint64 cache; /* assumed to be twice as long as the usual random number */
+ uint64_t cache; /* assumed to be twice as long as the usual random number */
int bits_left; /* bit results */
- static uint32
- scale_down(uint64 x,
+ static uint32_t
+ scale_down(uint64_t x,
#if _GLIBCXX_SCALE_DOWN_FPU
- uint64 /*supremum*/, double supremum_reciprocal)
+ uint64_t /*supremum*/, double supremum_reciprocal)
#else
- uint64 supremum, double /*supremum_reciprocal*/)
+ uint64_t supremum, double /*supremum_reciprocal*/)
#endif
{
#if _GLIBCXX_SCALE_DOWN_FPU
- return (uint32)(x * supremum_reciprocal);
+ return (uint32_t)(x * supremum_reciprocal);
#else
- return static_cast<uint32>(x % supremum);
+ return static_cast<uint32_t>(x % supremum);
#endif
}
@@ -367,7 +367,7 @@
/** @brief Default constructor. Seed with 0. */
random_number()
: mt(0), supremum(0x100000000ULL),
- RAND_SUP(1ULL << (sizeof(uint32) * 8)),
+ RAND_SUP(1ULL << (sizeof(uint32_t) * 8)),
supremum_reciprocal((double)supremum / (double)RAND_SUP),
RAND_SUP_REC(1.0 / (double)RAND_SUP),
cache(0), bits_left(0) { }
@@ -376,22 +376,22 @@
* @param seed Random seed.
* @param supremum Generate integer random numbers in the
* interval @c [0,supremum). */
- random_number(uint32 seed, uint64 supremum = 0x100000000ULL)
+ random_number(uint32_t seed, uint64_t supremum = 0x100000000ULL)
: mt(seed), supremum(supremum),
- RAND_SUP(1ULL << (sizeof(uint32) * 8)),
+ RAND_SUP(1ULL << (sizeof(uint32_t) * 8)),
supremum_reciprocal((double)supremum / (double)RAND_SUP),
RAND_SUP_REC(1.0 / (double)RAND_SUP),
cache(0), bits_left(0) { }
/** @brief Generate unsigned random 32-bit integer. */
- uint32
+ uint32_t
operator()()
{ return scale_down(mt(), supremum, supremum_reciprocal); }
/** @brief Generate unsigned random 32-bit integer in the
interval @c [0,local_supremum). */
- uint32
- operator()(uint64 local_supremum)
+ uint32_t
+ operator()(uint64_t local_supremum)
{
return scale_down(mt(), local_supremum,
(double)local_supremum * RAND_SUP_REC);
@@ -400,7 +400,7 @@
/** @brief Set the random seed.
* @param seed to set. */
void
- set_seed(uint32 seed)
+ set_seed(uint32_t seed)
{
mt.seed(seed);
cache = mt();
@@ -417,7 +417,7 @@
bits_left -= bits;
if (bits_left < 32)
{
- cache |= (((uint64)mt()) << bits_left);
+ cache |= (((uint64_t)mt()) << bits_left);
bits_left += 32;
}
return res;
@@ -433,7 +433,7 @@
bits_left -= bits;
if (bits_left < 32)
{
- cache |= (((uint64)mt()) << bits_left);
+ cache |= (((uint64_t)mt()) << bits_left);
bits_left += 32;
}
return res;
Index: testsuite/25_algorithms/nth_element/1.cc
===================================================================
--- testsuite/25_algorithms/nth_element/1.cc (revision 132352)
+++ testsuite/25_algorithms/nth_element/1.cc (working copy)
@@ -49,6 +49,7 @@
void
test3()
{
+ bool test __attribute__((unused)) = true;
int array[] = {6, 5, 4, 3, 2, 1, 0};
Container con(array, array + 7);
nth_element(con.begin(), con.it(3), con.end());
@@ -61,6 +62,7 @@
void
test4()
{
+ bool test __attribute__((unused)) = true;
int array[] = {0, 6, 1, 5, 2, 4, 3};
Container con(array,array + 7);
nth_element(con.begin(), con.it(3), con.end());
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [v3] parallel mode use cstdint
2008-02-15 20:48 [v3] parallel mode use cstdint Benjamin Kosnik
@ 2008-02-16 10:28 ` Benjamin Kosnik
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Kosnik @ 2008-02-16 10:28 UTC (permalink / raw)
To: Benjamin Kosnik; +Cc: libstdc++, gcc-patches, singler
[-- Attachment #1: Type: text/plain, Size: 113 bytes --]
Whoops, merge mess-up. This part can be removed.
-benjamin
> tested x86/linux
> tested x86/linux parallel mode
[-- Attachment #2: p.20080215-2 --]
[-- Type: application/octet-stream, Size: 1686 bytes --]
2008-02-15 Benjamin Kosnik <bkoz@redhat.com>
* include/parallel/types.h: Remove enum parallelism.
Index: include/parallel/types.h
===================================================================
--- include/parallel/types.h (revision 132362)
+++ include/parallel/types.h (working copy)
@@ -70,60 +70,6 @@
inline bool
is_parallel(const parallelism __p) { return __p != sequential; }
- /// @brief Sorting algorithms: multi-way mergesort, quicksort,
- /// load-balanced quicksort.
- enum SortAlgorithm
- {
- MWMS,
- QS,
- QS_BALANCED
- };
-
- /// @brief Merging algorithms: bubblesort-alike, loser-tree
- /// variants, enum sentinel.
- enum MultiwayMergeAlgorithm
- {
- BUBBLE,
- LOSER_TREE_EXPLICIT,
- LOSER_TREE,
- LOSER_TREE_COMBINED,
- LOSER_TREE_SENTINEL,
- MWM_ALGORITHM_LAST
- };
-
- /// @brief Partial sum algorithms: recursive, linear.
- enum PartialSumAlgorithm
- {
- RECURSIVE,
- LINEAR
- };
-
- /// @brief Splitting strategies for sorting/merging: sampling, exact.
- enum Splitting
- {
- SAMPLING,
- EXACT
- };
-
- /// @brief Find distribution strategies: growing blocks, equal-sized
- /// blocks, equal splitting.
- enum FindDistribution
- {
- GROWING_BLOCKS,
- CONSTANT_SIZE_BLOCKS,
- EQUAL_SPLIT
- };
-
- /// @brief Strategies for run-time algorithm selection:
- /// force_sequential, force_parallel, heuristic.
- enum AlgorithmSelection
- {
- heuristic,
- force_sequential,
- force_parallel
- };
-
-
/// Integer Types.
using std::tr1::int16_t;
using std::tr1::uint16_t;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-16 6:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-15 20:48 [v3] parallel mode use cstdint Benjamin Kosnik
2008-02-16 10:28 ` Benjamin Kosnik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).