~ubuntu-branches/ubuntu/precise/judy/precise

« back to all changes in this revision

Viewing changes to src/JudyCommon/JudySearchLeaf.c

  • Committer: Bazaar Package Importer
  • Author(s): Troy Heber
  • Date: 2005-03-22 06:55:53 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050322065553-syjpkd48r4re18dn
Tags: 1.0.1-5

* Moving LGPL link in copyright back to LGPL-2.1
* Cleanup of debian/rules: removed explicit refs to 32-bit archs, removed
  unnecessary nostrip, using --man dir to install man pages, moving from
  dh_movefiles to dh_install.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Copyright (C) 2000 - 2002 Hewlett-Packard Company
2
 
//
3
 
// This program is free software; you can redistribute it and/or modify it
4
 
// under the term of the GNU Lesser General Public License as published by the
5
 
// Free Software Foundation; either version 2 of the License, or (at your
6
 
// option) any later version.
7
 
//
8
 
// This program is distributed in the hope that it will be useful, but WITHOUT
9
 
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
 
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
11
 
// for more details.
12
 
//
13
 
// You should have received a copy of the GNU Lesser General Public License
14
 
// along with this program; if not, write to the Free Software Foundation,
15
 
// Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
 
// _________________
17
 
 
18
 
// @(#) $Revision: 4.35 $ $Source: /judy/src/JudyCommon/JudySearchLeaf.c $
19
 
 
20
 
// At least in some contexts, this source file is #include'd by others for
21
 
// inlining, so ensure it only happens once:
22
 
 
23
 
#ifndef _JUDYSEARCHLEAF
24
 
#define _JUDYSEARCHLEAF
25
 
 
26
 
// JUDY LINEAR LEAF SEARCH AND BIT COUNTING FUNCTIONS.
27
 
//
28
 
// TBD:  Despite the names of some of these functions, they only search linear
29
 
// leaves, not bitmap leaves; and they are also used to search the index list
30
 
// portion of linear branches (Branch2..7), and one-byte immediates (Immed1*).
31
 
// Consider renaming them to __JudySearchLin*().
32
 
//
33
 
// Search function return values:
34
 
//
35
 
// All the search functions below return the position (offset, base 0) in the
36
 
// source array of the index passed in.  If the index is not found, the return
37
 
// value is the the ones-complement of the sought index's ideal position.  For
38
 
// example:
39
 
//
40
 
//   array: 10 20 30 40 50
41
 
//
42
 
//      Index to search for        returned value
43
 
//      -------------------        --------------
44
 
//              10                       0
45
 
//              20                       1
46
 
//              30                       2
47
 
//               5                      ~0  (that is, -1)
48
 
//              15                      ~1
49
 
//             100                      ~5
50
 
//
51
 
// The caller should check for result >= 0 for a match.  To get the position
52
 
// (offset) in which an absent index belongs, just take the ones-complement
53
 
// again.
54
 
 
55
 
 
56
 
#include "JudyPrivate.h"
57
 
#include "JudyPrivateBranch.h"
58
 
 
59
 
DBGCODE(void JudyCheckSorted(Pjll_t Pjll, Word_t Pop1, long IndexSize);)
60
 
 
61
 
// Leaf search function return types here depend on compilation context:
62
 
 
63
 
#ifdef COMPILE_INLINE
64
 
#define RETURN_TYPE static int
65
 
#else
66
 
#define RETURN_TYPE int
67
 
#endif
68
 
 
69
 
#ifdef JU_NOINLINE
70
 
 
71
 
// ****************************************************************************
72
 
// __ J U D Y   S E A R C H   L E A F   1
73
 
//
74
 
// Search a 1-byte-Index linear leaf (cJ*_JPLEAF1) for the specified Index.
75
 
// The return value is described in file header comments.
76
 
//
77
 
// Note:  Although Judy1 on 64-bit systems does not have Leaf1's, this function
78
 
// is also used to search BranchL's and Immed1*'s, as noted in file header
79
 
// comments.
80
 
 
81
 
FUNCTION RETURN_TYPE __JudySearchLeaf1(
82
 
        Pjll_t  Pjll,           // to linear Leaf1 to search.
83
 
        Word_t LeafPop1,        // number of valid indexes.
84
 
        Word_t Index)           // to find.
85
 
{
86
 
        Index &= MASK1;         // look for last BPI1 bytes only.
87
 
 
88
 
#undef  PLEAF_T                 // in case previously set.
89
 
#define PLEAF_T uint8_t *       // for JudySearchLeafEven.c.
90
 
 
91
 
#undef  BPI
92
 
#define BPI BPI1
93
 
 
94
 
#undef  IPC
95
 
#define IPC IPC1
96
 
 
97
 
#include "JudySearchLeafEven.c"
98
 
 
99
 
} // __JudySearchLeaf1()
100
 
 
101
 
 
102
 
// ****************************************************************************
103
 
// __ J U D Y   S E A R C H   L E A F   2
104
 
//
105
 
// Search a 2-byte-Index linear leaf (cJ*_JPLEAF2, or the index list in a
106
 
// cJ*_JPBRANCH_L2) for the specified Index.  The return value is described in
107
 
// file header comments.
108
 
 
109
 
FUNCTION RETURN_TYPE __JudySearchLeaf2(
110
 
        Pjll_t Pjll,            // to linear Leaf2 to search.
111
 
        Word_t LeafPop1,        // number of valid indexes.
112
 
        Word_t Index)           // to find.
113
 
{
114
 
        Index &= MASK2;         // look for last BPI2 bytes only.
115
 
 
116
 
#undef  PLEAF_T                 // in case previously set.
117
 
#define PLEAF_T uint16_t *      // for JudySearchLeafEven.c.
118
 
 
119
 
#undef  BPI
120
 
#define BPI BPI2
121
 
 
122
 
#undef  IPC
123
 
#define IPC IPC2
124
 
 
125
 
#include "JudySearchLeafEven.c"
126
 
 
127
 
} // __JudySearchLeaf2()
128
 
 
129
 
#endif // JU_NOINLINE
130
 
 
131
 
// ****************************************************************************
132
 
// __ J U D Y   S E A R C H   L E A F   3
133
 
//
134
 
// Search a 3-byte-Index linear leaf (cJ*_JPLEAF3, or the index list in a
135
 
// cJ*_JPBRANCH_L3) for the specified Index.  The return value is described in
136
 
// file header comments.
137
 
 
138
 
FUNCTION RETURN_TYPE __JudySearchLeaf3(
139
 
        Pjll_t Pjll,            // to linear Leaf3 to search.
140
 
        Word_t LeafPop1,        // number of valid indexes.
141
 
        Word_t Index)           // to find.
142
 
{
143
 
#undef  BPI                     // in case previously set.
144
 
#undef  IPC
145
 
#undef  IPG
146
 
#undef  WPG
147
 
#undef  MASK
148
 
#define BPI  BPI3               // for JudySearchLeafOdd.c.
149
 
#define IPC  IPC3
150
 
#define IPG  IPG3
151
 
#define WPG  WPG3
152
 
#define MASK MASK3
153
 
 
154
 
#undef  GET_0
155
 
#undef  GET_1
156
 
#undef  GET_2
157
 
#undef  GET_3
158
 
#undef  GET_4
159
 
#undef  GET_5
160
 
#undef  GET_6
161
 
#undef  GET_LIG
162
 
#define GET_0   GET3_0
163
 
#define GET_1   GET3_1
164
 
#define GET_2   GET3_2
165
 
#ifdef JU_64BIT
166
 
#define GET_3   GET3_3
167
 
#define GET_4   GET3_4
168
 
#define GET_5   GET3_5
169
 
#define GET_6   GET3_6
170
 
#endif
171
 
#define GET_LIG GET3_LIG
172
 
 
173
 
// Unfortunately IPG itself is an expression the compiler can't seem to handle,
174
 
// so define IPG_BIG here explicitly, though this contains knowledge of IPG
175
 
// values:
176
 
 
177
 
#undef  IPG_BIG
178
 
#ifdef JU_64BIT
179
 
#define IPG_BIG 1                       // set to 1 for "#if".
180
 
#endif
181
 
 
182
 
#undef  JU_COPY_PINDEX_TO_LONG
183
 
#define JU_COPY_PINDEX_TO_LONG(LI,PI) JU_COPY3_PINDEX_TO_LONG(LI,PI)
184
 
 
185
 
#include "JudySearchLeafOdd.c"
186
 
 
187
 
} // __JudySearchLeaf3()
188
 
 
189
 
 
190
 
#ifdef JU_64BIT
191
 
 
192
 
#ifdef JU_NOINLINE
193
 
 
194
 
// ****************************************************************************
195
 
// __ J U D Y   S E A R C H   L E A F   4
196
 
//
197
 
// Search a 4-byte-Index linear leaf (cJ*_JPLEAF4, or the index list in a
198
 
// cJ*_JPBRANCH_L4) for the specified Index.  The return value is described in
199
 
// file header comments.
200
 
 
201
 
FUNCTION RETURN_TYPE __JudySearchLeaf4(
202
 
        Pjll_t Pjll,            // to linear Leaf4 to search.
203
 
        Word_t LeafPop1,        // number of valid indexes.
204
 
        Word_t Index)           // to find.
205
 
{
206
 
        Index &= MASK4;         // look for last BPI4 bytes only.
207
 
 
208
 
#undef  PLEAF_T                 // in case previously set.
209
 
#define PLEAF_T uint32_t *      // for JudySearchLeafEven.c.
210
 
 
211
 
#undef  BPI
212
 
#define BPI BPI4
213
 
 
214
 
#undef  IPC
215
 
#define IPC IPC4
216
 
 
217
 
#include "JudySearchLeafEven.c"
218
 
 
219
 
} // __JudySearchLeaf4()
220
 
 
221
 
#endif // JU_NOINLINE
222
 
 
223
 
 
224
 
// ****************************************************************************
225
 
// __ J U D Y   S E A R C H   L E A F   5
226
 
//
227
 
// Search a 5-byte-Index linear leaf (cJ*_JPLEAF5, or the index list in a
228
 
// cJ*_JPBRANCH_L5) for the specified Index.  The return value is described in
229
 
// file header comments.
230
 
 
231
 
FUNCTION RETURN_TYPE __JudySearchLeaf5(
232
 
        Pjll_t Pjll,            // to linear Leaf5 to search.
233
 
        Word_t LeafPop1,        // number of valid indexes.
234
 
        Word_t Index)           // to find.
235
 
{
236
 
#undef  BPI                     // in case previously set.
237
 
#undef  IPC
238
 
#undef  IPG
239
 
#undef  WPG
240
 
#undef  MASK
241
 
#define BPI  BPI5               // for JudySearchLeafOdd.c.
242
 
#define IPC  IPC5
243
 
#define IPG  IPG5
244
 
#define WPG  WPG5
245
 
#define MASK MASK5
246
 
 
247
 
#undef  GET_0
248
 
#undef  GET_1
249
 
#undef  GET_2
250
 
#undef  GET_3
251
 
#undef  GET_4
252
 
#undef  GET_5
253
 
#undef  GET_6
254
 
#undef  GET_LIG
255
 
#define GET_0   GET5_0
256
 
#define GET_1   GET5_1
257
 
#define GET_2   GET5_2
258
 
#define GET_3   GET5_3
259
 
#define GET_4   GET5_4
260
 
#define GET_5   GET5_5
261
 
#define GET_6   GET5_6
262
 
#define GET_LIG GET5_LIG
263
 
 
264
 
// Unfortunately IPG itself is an expression the compiler can't seem to handle,
265
 
// so define IPG_BIG here explicitly, though this contains knowledge of IPG
266
 
// values:
267
 
 
268
 
#undef  IPG_BIG
269
 
#define IPG_BIG 1                       // set to 1 for "#if".
270
 
 
271
 
#undef  JU_COPY_PINDEX_TO_LONG
272
 
#define JU_COPY_PINDEX_TO_LONG(LI,PI) JU_COPY5_PINDEX_TO_LONG(LI,PI)
273
 
 
274
 
#include "JudySearchLeafOdd.c"
275
 
 
276
 
} // __JudySearchLeaf5()
277
 
 
278
 
 
279
 
// ****************************************************************************
280
 
// __ J U D Y   S E A R C H   L E A F   6
281
 
//
282
 
// Search a 6-byte-Index linear leaf (cJ*_JPLEAF6, or the index list in a
283
 
// cJ*_JPBRANCH_L6) for the specified Index.  The return value is described in
284
 
// file header comments.
285
 
 
286
 
FUNCTION RETURN_TYPE __JudySearchLeaf6(
287
 
        Pjll_t Pjll,            // to linear Leaf6 to search.
288
 
        Word_t LeafPop1,        // number of valid indexes.
289
 
        Word_t Index)           // to find.
290
 
{
291
 
#undef  BPI                     // in case previously set.
292
 
#undef  IPC
293
 
#undef  IPG
294
 
#undef  WPG
295
 
#undef  MASK
296
 
#define BPI  BPI6               // for JudySearchLeafOdd.c.
297
 
#define IPC  IPC6
298
 
#define IPG  IPG6
299
 
#define WPG  WPG6
300
 
#define MASK MASK6
301
 
 
302
 
#undef  GET_0
303
 
#undef  GET_1
304
 
#undef  GET_2
305
 
#undef  GET_LIG
306
 
#define GET_0   GET6_0
307
 
#define GET_1   GET6_1
308
 
#define GET_2   GET6_2
309
 
#define GET_LIG GET6_LIG
310
 
 
311
 
// Unfortunately IPG itself is an expression the compiler can't seem to handle,
312
 
// so unset IPG_BIG here explicitly, though this contains knowledge of IPG
313
 
// values:
314
 
 
315
 
#undef  IPG_BIG
316
 
 
317
 
#undef  JU_COPY_PINDEX_TO_LONG
318
 
#define JU_COPY_PINDEX_TO_LONG(LI,PI) JU_COPY6_PINDEX_TO_LONG(LI,PI)
319
 
 
320
 
#include "JudySearchLeafOdd.c"
321
 
 
322
 
} // __JudySearchLeaf6()
323
 
 
324
 
 
325
 
// ****************************************************************************
326
 
// __ J U D Y   S E A R C H   L E A F   7
327
 
//
328
 
// Search a 7-byte-Index linear leaf (cJ*_JPLEAF7, or the index list in a
329
 
// cJ*_JPBRANCH_L7) for the specified Index.  The return value is described in
330
 
// file header comments.
331
 
 
332
 
FUNCTION RETURN_TYPE __JudySearchLeaf7(
333
 
        Pjll_t Pjll,            // to linear Leaf7 to search.
334
 
        Word_t LeafPop1,        // number of valid indexes.
335
 
        Word_t Index)           // to find.
336
 
{
337
 
#undef  BPI                     // in case previously set.
338
 
#undef  IPC
339
 
#undef  IPG
340
 
#undef  WPG
341
 
#undef  MASK
342
 
#define BPI  BPI7               // for JudySearchLeafOdd.c.
343
 
#define IPC  IPC7
344
 
#define IPG  IPG7
345
 
#define WPG  WPG7
346
 
#define MASK MASK7
347
 
 
348
 
#undef  GET_0
349
 
#undef  GET_1
350
 
#undef  GET_2
351
 
#undef  GET_3
352
 
#undef  GET_4
353
 
#undef  GET_5
354
 
#undef  GET_6
355
 
#undef  GET_LIG
356
 
#define GET_0   GET7_0
357
 
#define GET_1   GET7_1
358
 
#define GET_2   GET7_2
359
 
#define GET_3   GET7_3
360
 
#define GET_4   GET7_4
361
 
#define GET_5   GET7_5
362
 
#define GET_6   GET7_6
363
 
#define GET_LIG GET7_LIG
364
 
 
365
 
// Unfortunately IPG itself is an expression the compiler can't seem to handle,
366
 
// so define IPG_BIG here explicitly, though this contains knowledge of IPG
367
 
// values:
368
 
 
369
 
#undef  IPG_BIG
370
 
#define IPG_BIG 1                       // set to 1 for "#if".
371
 
 
372
 
#undef  JU_COPY_PINDEX_TO_LONG
373
 
#define JU_COPY_PINDEX_TO_LONG(LI,PI) JU_COPY7_PINDEX_TO_LONG(LI,PI)
374
 
 
375
 
#include "JudySearchLeafOdd.c"
376
 
 
377
 
} // __JudySearchLeaf7()
378
 
 
379
 
#endif // JU_64BIT
380
 
 
381
 
 
382
 
#ifdef JU_NOINLINE
383
 
 
384
 
// ****************************************************************************
385
 
// __ J U D Y   S E A R C H   L E A F   W
386
 
//
387
 
// Search a root-level leaf (cJ*_JAPLEAF, index size = Word_t) for the
388
 
// specified Index.  The return value is described in file header comments.
389
 
 
390
 
FUNCTION RETURN_TYPE __JudySearchLeafW(
391
 
        Pjlw_t Pjlw,            // to linear LeafW to search.
392
 
        Word_t LeafPop1,        // number of valid indexes.
393
 
        Word_t Index)           // to find.
394
 
{
395
 
#undef  PLEAF_T                 // in case previously set.
396
 
#define PLEAF_T Pjlw_t          // for JudySearchLeafEven.c.
397
 
 
398
 
#undef  BPI
399
 
#define BPI BPIL
400
 
 
401
 
#undef  IPC
402
 
#define IPC IPCL
403
 
 
404
 
        Pjll_t Pjll = (Pjll_t) Pjlw;
405
 
 
406
 
#include "JudySearchLeafEven.c"
407
 
 
408
 
} // __JudySearchLeafW()
409
 
 
410
 
 
411
 
// ****************************************************************************
412
 
// __ J U D Y   C O U N T   B I T S   B
413
 
//
414
 
// Return the number of bits set in "Word", for a bitmap branch.
415
 
//
416
 
// Note:  Bitmap branches have maximum bitmap size = 32 bits.
417
 
 
418
 
FUNCTION BITMAPB_t __JudyCountBitsB(BITMAPB_t word)
419
 
{
420
 
        word = (word & 0x55555555) + ((word & 0xAAAAAAAA) >>  1);
421
 
        word = (word & 0x33333333) + ((word & 0xCCCCCCCC) >>  2);
422
 
        word = (word & 0x0F0F0F0F) + ((word & 0xF0F0F0F0) >>  4); // >= 8 bits.
423
 
#if defined(BITMAP_BRANCH16x16) || defined(BITMAP_BRANCH32x8)
424
 
        word = (word & 0x00FF00FF) + ((word & 0xFF00FF00) >>  8); // >= 16 bits.
425
 
#endif
426
 
#ifdef BITMAP_BRANCH32x8
427
 
        word = (word & 0x0000FFFF) + ((word & 0xFFFF0000) >> 16); // >= 32 bits.
428
 
#endif
429
 
        return(word);
430
 
 
431
 
} // __JudyCountBitsB()
432
 
 
433
 
 
434
 
// ****************************************************************************
435
 
// __ J U D Y   C O U N T   B I T S   L
436
 
//
437
 
// Return the number of bits set in "Word", for a bitmap leaf.
438
 
//
439
 
// Note:  Bitmap branches have maximum bitmap size = 32 bits.
440
 
 
441
 
// Note:  Need both 32-bit and 64-bit versions of __JudyCountBitsL() because
442
 
// bitmap leaves can have 64-bit bitmaps.
443
 
 
444
 
FUNCTION BITMAPL_t __JudyCountBitsL(BITMAPL_t word)
445
 
{
446
 
#ifndef JU_64BIT
447
 
 
448
 
        word = (word & 0x55555555) + ((word & 0xAAAAAAAA) >>  1);
449
 
        word = (word & 0x33333333) + ((word & 0xCCCCCCCC) >>  2);
450
 
        word = (word & 0x0F0F0F0F) + ((word & 0xF0F0F0F0) >>  4); // >= 8 bits.
451
 
#if defined(BITMAP_LEAF16x16) || defined(BITMAP_LEAF32x8)
452
 
        word = (word & 0x00FF00FF) + ((word & 0xFF00FF00) >>  8); // >= 16 bits.
453
 
#endif
454
 
#ifdef BITMAP_LEAF32x8
455
 
        word = (word & 0x0000FFFF) + ((word & 0xFFFF0000) >> 16); // >= 32 bits.
456
 
#endif
457
 
 
458
 
#else // JU_64BIT
459
 
 
460
 
        word = (word & 0x5555555555555555) + ((word & 0xAAAAAAAAAAAAAAAA) >> 1);
461
 
        word = (word & 0x3333333333333333) + ((word & 0xCCCCCCCCCCCCCCCC) >> 2);
462
 
        word = (word & 0x0F0F0F0F0F0F0F0F) + ((word & 0xF0F0F0F0F0F0F0F0) >> 4);
463
 
#if defined(BITMAP_LEAF16x16) || defined(BITMAP_LEAF32x8) || defined(BITMAP_LEAF64x4)
464
 
        word = (word & 0x00FF00FF00FF00FF) + ((word & 0xFF00FF00FF00FF00) >> 8);
465
 
#endif
466
 
#if defined(BITMAP_LEAF32x8) || defined(BITMAP_LEAF64x4)
467
 
        word = (word & 0x0000FFFF0000FFFF) + ((word & 0xFFFF0000FFFF0000) >>16);
468
 
#endif
469
 
#ifdef BITMAP_LEAF64x4
470
 
        word = (word & 0x00000000FFFFFFFF) + ((word & 0xFFFFFFFF00000000) >>32);
471
 
#endif
472
 
#endif // JU_64BIT
473
 
 
474
 
        return(word);
475
 
 
476
 
} // __JudyCountBitsL()
477
 
 
478
 
#endif // JU_NOINLINE
479
 
 
480
 
 
481
 
#ifdef DEBUG
482
 
 
483
 
// ****************************************************************************
484
 
// J U D Y   C H E C K   S O R T E D
485
 
//
486
 
// Given a pointer to a packed list of Pop1 N-byte indexes (N = IndexSize),
487
 
// assert that the list is in order.
488
 
 
489
 
FUNCTION void JudyCheckSorted(
490
 
        Pjll_t Pjll,            // leaf or list to check.
491
 
        Word_t Pop1,            // number of indexes to check.
492
 
        long   IndexSize)       // bytes per index in list.
493
 
{
494
 
 
495
 
// Macros for common code:
496
 
//
497
 
// Check a list of "even"-sized indexes, counting backwards from last to first:
498
 
//
499
 
// Pjll and Pop1 are in the context.
500
 
 
501
 
#define JU_CHECKSORTED(PType)   \
502
 
        while (--Pop1 > 0)      \
503
 
            assert(((PType) Pjll)[Pop1 - 1] < ((PType) Pjll)[Pop1]); \
504
 
        break
505
 
 
506
 
// Check a list of "odd"-sized indexes, which requires first copying each one
507
 
// to an aligned word:
508
 
//
509
 
// Pjll, Pop1, and IndexSize are in the context.
510
 
 
511
 
#define JU_CHECKSORTED_ODD(CopyIndex)                   \
512
 
        {                                               \
513
 
            Word_t indexlow;                            \
514
 
            Word_t indexhigh;                           \
515
 
            long   offset;                              \
516
 
                                                        \
517
 
            CopyIndex(indexlow, (uint8_t *) Pjll);      \
518
 
                                                        \
519
 
            for (offset = 1; offset < Pop1; ++offset)   \
520
 
            {                                           \
521
 
                CopyIndex(indexhigh,                    \
522
 
                          ((uint8_t *) Pjll) + (offset * IndexSize)); \
523
 
                assert(indexlow < indexhigh);           \
524
 
                indexlow = indexhigh;                   \
525
 
            }                                           \
526
 
            break;                                      \
527
 
        }
528
 
 
529
 
        switch (IndexSize)
530
 
        {
531
 
        case 1: JU_CHECKSORTED(uint8_t *);
532
 
        case 2: JU_CHECKSORTED(uint16_t *);
533
 
        case 3: JU_CHECKSORTED_ODD(JU_COPY3_PINDEX_TO_LONG);
534
 
        case 4: JU_CHECKSORTED(uint32_t *);
535
 
#ifdef JU_64BIT
536
 
        case 5: JU_CHECKSORTED_ODD(JU_COPY5_PINDEX_TO_LONG);
537
 
        case 6: JU_CHECKSORTED_ODD(JU_COPY6_PINDEX_TO_LONG);
538
 
        case 7: JU_CHECKSORTED_ODD(JU_COPY7_PINDEX_TO_LONG);
539
 
        case 8: JU_CHECKSORTED(Pjlw_t);
540
 
#endif
541
 
        default:  assert(FALSE);        // invalid IndexSize.
542
 
        }
543
 
 
544
 
} // JudyCheckSorted()
545
 
 
546
 
#endif // DEBUG
547
 
 
548
 
#endif // _JUDYSEARCHLEAF