STXXL  1.4-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
types.h
Go to the documentation of this file.
1 /***************************************************************************
2  * include/stxxl/bits/parallel/types.h
3  *
4  * Basic typedefs.
5  * Extracted from MCSTL http://algo2.iti.uni-karlsruhe.de/singler/mcstl/
6  *
7  * Part of the STXXL. See http://stxxl.sourceforge.net
8  *
9  * Copyright (C) 2007 Johannes Singler <[email protected]>
10  * Copyright (C) 2014 Timo Bingmann <[email protected]>
11  *
12  * Distributed under the Boost Software License, Version 1.0.
13  * (See accompanying file LICENSE_1_0.txt or copy at
14  * http://www.boost.org/LICENSE_1_0.txt)
15  **************************************************************************/
16 
17 #ifndef STXXL_PARALLEL_TYPES_HEADER
18 #define STXXL_PARALLEL_TYPES_HEADER
19 
20 #include <stxxl/bits/namespace.h>
22 #include <cstdlib>
23 
25 
26 namespace parallel {
27 
28 /**
29  * Unsigned integer to index elements.
30  * The total number of elements for each algorithm must fit into this type.
31  */
33 /**
34  * Unsigned integer to index a thread number.
35  * The maximum thread number must fit into this type.
36  */
37 typedef int thread_index_t;
38 /**
39  * Longest compare-and-swappable integer type on this platform.
40  */
41 typedef int64 lcas_t;
42 /**
43  * Number of bits of ::lcas_t.
44  */
45 static const size_t lcas_t_bits = sizeof(lcas_t) * 8;
46 /**
47  * ::lcas_t with the right half of bits set to 1.
48  */
49 static const lcas_t lcas_t_mask = (((lcas_t)1 << (lcas_t_bits / 2)) - 1);
50 
51 } // namespace parallel
52 
54 
55 #endif // !STXXL_PARALLEL_TYPES_HEADER
int thread_index_t
Definition: types.h:37
long long int int64
Definition: types.h:38
unsigned long long int uint64
Definition: types.h:39
int64 lcas_t
Definition: types.h:41
uint64 sequence_index_t
Definition: types.h:32
#define STXXL_BEGIN_NAMESPACE
Definition: namespace.h:16
static const lcas_t lcas_t_mask
Definition: types.h:49
static const size_t lcas_t_bits
Definition: types.h:45
#define STXXL_END_NAMESPACE
Definition: namespace.h:17