Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Side by Side Diff: courgette/third_party/divsufsort/divsufsort_private.h

Issue 2156223002: [Courgette] Add third party-library: libdivsufsort. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restrict CL to third_party code addition only. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2003-2008 Yuta Mori All Rights Reserved.
2 //
3 // For the terms under which this work may be distributed, please see
4 // the adjoining file "LICENSE".
5 //
6 // ChangeLog:
7 // 2016-07-18 - Initial commit and adaption to use PagedArray.
8 // --Samuel Huang <huangs@chromium.org>
9
10 #ifndef COURGETTE_BSDIFF_THIRD_PARTY_DIVSUFSORT_PRIVATE_H_
11 #define COURGETTE_BSDIFF_THIRD_PARTY_DIVSUFSORT_PRIVATE_H_
12
13 #include <assert.h>
14 #include <stdint.h>
15 #include <stdio.h>
16
17 #include "courgette/third_party/divsufsort/divsufsort.h"
18
19 namespace divsuf {
20
21 /*- Constants -*/
22 #if !defined(UINT8_MAX)
23 # define UINT8_MAX (255)
24 #endif /* UINT8_MAX */
25 #if defined(ALPHABET_SIZE) && (ALPHABET_SIZE < 1)
26 # undef ALPHABET_SIZE
27 #endif
28 #if !defined(ALPHABET_SIZE)
29 # define ALPHABET_SIZE (UINT8_MAX + 1)
30 #endif
31
32 /*- Macros -*/
33 #ifndef SWAP
34 # define SWAP(_a, _b) do { t = (_a); (_a) = (_b); (_b) = t; } while(0)
35 #endif /* SWAP */
36 #ifndef MIN
37 # define MIN(_a, _b) (((_a) < (_b)) ? (_a) : (_b))
38 #endif /* MIN */
39 #ifndef MAX
40 # define MAX(_a, _b) (((_a) > (_b)) ? (_a) : (_b))
41 #endif /* MAX */
42
43 /*- Private Prototypes -*/
44 /* sssort.c */
45 void
46 sssort(const sauchar_t *T, const_saidx_it PA,
47 saidx_it first, saidx_it last,
48 saidx_it buf, saidx_t bufsize,
49 saidx_t depth, saidx_t n, saint_t lastsuffix);
50
51 /* trsort.c */
52 void
53 trsort(saidx_it ISA, saidx_it SA, saidx_t n, saidx_t depth);
54
55 } // namespace divsuf
56
57 #endif // COURGETTE_BSDIFF_THIRD_PARTY_DIVSUFSORT_PRIVATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698