tlds
Transactional Operations for Linked Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
alg_radix_smp.h
Go to the documentation of this file.
1 /* =============================================================================
2  *
3  * alg_radix_smp.h
4  *
5  * =============================================================================
6  *
7  * For the license of bayes/sort.h and bayes/sort.c, please see the header
8  * of the files.
9  *
10  * ------------------------------------------------------------------------
11  *
12  * For the license of kmeans, please see kmeans/LICENSE.kmeans
13  *
14  * ------------------------------------------------------------------------
15  *
16  * For the license of ssca2, please see ssca2/COPYRIGHT
17  *
18  * ------------------------------------------------------------------------
19  *
20  * For the license of lib/mt19937ar.c and lib/mt19937ar.h, please see the
21  * header of the files.
22  *
23  * ------------------------------------------------------------------------
24  *
25  * For the license of lib/rbtree.h and lib/rbtree.c, please see
26  * lib/LEGALNOTICE.rbtree and lib/LICENSE.rbtree
27  *
28  * ------------------------------------------------------------------------
29  *
30  * Unless otherwise noted, the following license applies to STAMP files:
31  *
32  * Copyright (c) 2007, Stanford University
33  * All rights reserved.
34  *
35  * Redistribution and use in source and binary forms, with or without
36  * modification, are permitted provided that the following conditions are
37  * met:
38  *
39  * * Redistributions of source code must retain the above copyright
40  * notice, this list of conditions and the following disclaimer.
41  *
42  * * Redistributions in binary form must reproduce the above copyright
43  * notice, this list of conditions and the following disclaimer in
44  * the documentation and/or other materials provided with the
45  * distribution.
46  *
47  * * Neither the name of Stanford University nor the names of its
48  * contributors may be used to endorse or promote products derived
49  * from this software without specific prior written permission.
50  *
51  * THIS SOFTWARE IS PROVIDED BY STANFORD UNIVERSITY ``AS IS'' AND ANY
52  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
53  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
54  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL STANFORD UNIVERSITY BE LIABLE
55  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
56  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
57  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
58  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
59  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
60  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
61  * THE POSSIBILITY OF SUCH DAMAGE.
62  *
63  * =============================================================================
64  */
65 
66 
67 #ifndef ALG_RADIX_SMP
68 #define ALG_RADIX_SMP 1
69 
70 
71 /* =============================================================================
72  * all_countsort_node
73  *
74  * R (range) must be a multiple of NODES
75  * q (elems/proc) must be a multiple of NODES
76  * =============================================================================
77  */
78 void
79 all_countsort_node (long q,
80  unsigned long* lKey,
81  unsigned long* lSorted,
82  long R,
83  long bitOff,
84  long m);
85 
86 
87 /* =============================================================================
88  * all_countsort_node_aux_seq
89  *
90  * R (range) must be a multiple of NODES
91  * q (elems/proc) must be a multiple of NODES
92  * =============================================================================
93  */
94 void
96  unsigned long* lKey,
97  unsigned long* lSorted,
98  unsigned long* auxKey,
99  unsigned long* auxSorted,
100  long R,
101  long bitOff,
102  long m);
103 
104 
105 /* =============================================================================
106  * all_countsort_node_aux
107  *
108  * R (range) must be a multiple of NODES
109  * q (elems/proc) must be a multiple of NODES
110  * =============================================================================
111  */
112 void
113 all_countsort_node_aux (long q,
114  unsigned long* lKey,
115  unsigned long* lSorted,
116  unsigned long* auxKey,
117  unsigned long* auxSorted,
118  long R,
119  long bitOff,
120  long m);
121 
122 
123 /* =============================================================================
124  * all_radixsort_node_s3
125  *
126  * q (elems/proc) must be a multiple of NODES
127  * =============================================================================
128  */
129 void
130 all_radixsort_node_s3 (long q,
131  unsigned long* lKeys,
132  unsigned long* lSorted);
133 
134 
135 /* =============================================================================
136  * all_radixsort_node_s2
137  *
138  * q (elems/proc) must be a multiple of NODES
139  * =============================================================================
140  */
141 void
142 all_radixsort_node_s2 (long q,
143  unsigned long* lKeys,
144  unsigned long* lSorted);
145 
146 
147 /* =============================================================================
148  * all_radixsort_node_aux_s3_seq
149  *
150  * q (elems/proc) must be a multiple of NODES
151  * =============================================================================
152  */
153 void
155  unsigned long* lKeys,
156  unsigned long* lSorted,
157  unsigned long* auxKey,
158  unsigned long* auxSorted);
159 
160 
161 /* =============================================================================
162  * all_radixsort_node_aux_s3
163  *
164  * q (elems/proc) must be a multiple of NODES
165  * =============================================================================
166  */
167 void
169  unsigned long* lKeys,
170  unsigned long* lSorted,
171  unsigned long* auxKey,
172  unsigned long* auxSorted);
173 
174 
175 #endif /* ALG_RADIX_SMP */
176 
177 
178 /* =============================================================================
179  *
180  * End of alg_radix_smp.h
181  *
182  * =============================================================================
183  */
184 
void all_radixsort_node_s2(long q, unsigned long *lKeys, unsigned long *lSorted)
Definition: alg_radix_smp.c:382
Definition: policies.hpp:256
void all_radixsort_node_aux_s3_seq(long q, unsigned long *lKeys, unsigned long *lSorted, unsigned long *auxKey, unsigned long *auxSorted)
Definition: alg_radix_smp.c:418
void all_radixsort_node_s3(long q, unsigned long *lKeys, unsigned long *lSorted)
Definition: alg_radix_smp.c:345
void all_countsort_node_aux(long q, unsigned long *lKey, unsigned long *lSorted, unsigned long *auxKey, unsigned long *auxSorted, long R, long bitOff, long m)
Definition: alg_radix_smp.c:248
void all_countsort_node(long q, unsigned long *lKey, unsigned long *lSorted, long R, long bitOff, long m)
Definition: alg_radix_smp.c:92
void all_radixsort_node_aux_s3(long q, unsigned long *lKeys, unsigned long *lSorted, unsigned long *auxKey, unsigned long *auxSorted)
Definition: alg_radix_smp.c:448
void all_countsort_node_aux_seq(long q, unsigned long *lKey, unsigned long *lSorted, unsigned long *auxKey, unsigned long *auxSorted, long R, long bitOff, long m)
Definition: alg_radix_smp.c:187