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

Unified Diff: courgette/third_party/divsufsort/divsufsort_private.h

Issue 1948843002: [Courgette Experimental] Replace QSufSort with libdivsufsort Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and merge. 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 side-by-side diff with in-line comments
Download patch
Index: courgette/third_party/divsufsort/divsufsort_private.h
diff --git a/courgette/third_party/divsufsort/divsufsort_private.h b/courgette/third_party/divsufsort/divsufsort_private.h
new file mode 100644
index 0000000000000000000000000000000000000000..031916efc6ee676ff45f468e7be43155d4797191
--- /dev/null
+++ b/courgette/third_party/divsufsort/divsufsort_private.h
@@ -0,0 +1,60 @@
+/*
+ * divsufsort_private.h for libdivsufsort
+ * Copyright (c) 2003-2008 Yuta Mori All Rights Reserved.
+ *
+ * For the terms under which this work may be distributed, please see
+ * the adjoining file "LICENSE".
+ *
+ * Changelog:
+ * 2016-06-02 - Initial commit and adaption to use PagedArray.
+ * --Samuel Huang <huangs@chromium.org>
+ */
+
+#ifndef COURGETTE_BSDIFF_THIRD_PARTY_DIVSUFSORT_PRIVATE_H_
+#define COURGETTE_BSDIFF_THIRD_PARTY_DIVSUFSORT_PRIVATE_H_
+
+#include <assert.h>
+#include <stdint.h>
+#include <stdio.h>
+
+#include "courgette/third_party/divsufsort/divsufsort.h"
+
+namespace divsuf {
+
+/*- Constants -*/
+#if !defined(UINT8_MAX)
+# define UINT8_MAX (255)
+#endif /* UINT8_MAX */
+#if defined(ALPHABET_SIZE) && (ALPHABET_SIZE < 1)
+# undef ALPHABET_SIZE
+#endif
+#if !defined(ALPHABET_SIZE)
+# define ALPHABET_SIZE (UINT8_MAX + 1)
+#endif
+
+/*- Macros -*/
+#ifndef SWAP
+# define SWAP(_a, _b) do { t = (_a); (_a) = (_b); (_b) = t; } while(0)
+#endif /* SWAP */
+#ifndef MIN
+# define MIN(_a, _b) (((_a) < (_b)) ? (_a) : (_b))
+#endif /* MIN */
+#ifndef MAX
+# define MAX(_a, _b) (((_a) > (_b)) ? (_a) : (_b))
+#endif /* MAX */
+
+/*- Private Prototypes -*/
+/* sssort.c */
+void
+sssort(const sauchar_t *T, const_saidx_it PA,
+ saidx_it first, saidx_it last,
+ saidx_it buf, saidx_t bufsize,
+ saidx_t depth, saidx_t n, saint_t lastsuffix);
+
+/* trsort.c */
+void
+trsort(saidx_it ISA, saidx_it SA, saidx_t n, saidx_t depth);
+
+} // namespace divsuf
+
+#endif // COURGETTE_BSDIFF_THIRD_PARTY_DIVSUFSORT_PRIVATE_H_
« 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