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

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: Fix typo in README.chromium: LICEN*S*E. Created 4 years, 4 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 // Permission is hereby granted, free of charge, to any person
4 // obtaining a copy of this software and associated documentation
5 // files (the "Software"), to deal in the Software without
6 // restriction, including without limitation the rights to use,
7 // copy, modify, merge, publish, distribute, sublicense, and/or sell
8 // copies of the Software, and to permit persons to whom the
9 // Software is furnished to do so, subject to the following
10 // conditions:
11 //
12 // The above copyright notice and this permission notice shall be
13 // included in all copies or substantial portions of the Software.
14 //
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17 // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20 // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 // OTHER DEALINGS IN THE SOFTWARE.
23 //
24 // ChangeLog:
25 // 2016-07-22 - Initial commit and adaption to use PagedArray.
26 // --Samuel Huang <huangs@chromium.org>
27
28 #ifndef COURGETTE_BSDIFF_THIRD_PARTY_DIVSUFSORT_PRIVATE_H_
29 #define COURGETTE_BSDIFF_THIRD_PARTY_DIVSUFSORT_PRIVATE_H_
30
31 #include <assert.h>
32 #include <stdint.h>
33 #include <stdio.h>
34
35 #include "courgette/third_party/divsufsort/divsufsort.h"
36
37 namespace divsuf {
38
39 /*- Constants -*/
40 #if !defined(UINT8_MAX)
41 # define UINT8_MAX (255)
42 #endif /* UINT8_MAX */
43 #if defined(ALPHABET_SIZE) && (ALPHABET_SIZE < 1)
44 # undef ALPHABET_SIZE
45 #endif
46 #if !defined(ALPHABET_SIZE)
47 # define ALPHABET_SIZE (UINT8_MAX + 1)
48 #endif
49
50 /*- Macros -*/
51 #ifndef SWAP
52 # define SWAP(_a, _b) do { t = (_a); (_a) = (_b); (_b) = t; } while(0)
53 #endif /* SWAP */
54 #ifndef MIN
55 # define MIN(_a, _b) (((_a) < (_b)) ? (_a) : (_b))
56 #endif /* MIN */
57 #ifndef MAX
58 # define MAX(_a, _b) (((_a) > (_b)) ? (_a) : (_b))
59 #endif /* MAX */
60
61 /*- Private Prototypes -*/
62 /* sssort.c */
63 void
64 sssort(const sauchar_t *T, const_saidx_it PA,
65 saidx_it first, saidx_it last,
66 saidx_it buf, saidx_t bufsize,
67 saidx_t depth, saidx_t n, saint_t lastsuffix);
68
69 /* trsort.c */
70 void
71 trsort(saidx_it ISA, saidx_it SA, saidx_t n, saidx_t depth);
72
73 } // namespace divsuf
74
75 #endif // COURGETTE_BSDIFF_THIRD_PARTY_DIVSUFSORT_PRIVATE_H_
OLDNEW
« no previous file with comments | « courgette/third_party/divsufsort/divsufsort.cc ('k') | courgette/third_party/divsufsort/divsufsort_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698