projects
/
SXSI
/
TextCollection.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added RLCSA index option
[SXSI/TextCollection.git]
/
incbwt
/
misc
/
definitions.h
diff --git
a/incbwt/misc/definitions.h
b/incbwt/misc/definitions.h
index
4903af2
..
f628400
100644
(file)
--- a/
incbwt/misc/definitions.h
+++ b/
incbwt/misc/definitions.h
@@
-5,6
+5,10
@@
#include <climits>
#include <climits>
+// #define MULTITHREAD_SUPPORT // Try to parallelize things using OpenMP.
+// #define MASSIVE_DATA_RLCSA // usint and sint become 64-bit in a 64-bit environment.
+
+
namespace CSA
{
namespace CSA
{
@@
-17,8
+21,14
@@
typedef unsigned int usint;
typedef signed int sint;
#endif
typedef signed int sint;
#endif
+#ifndef uint
+typedef unsigned int uint;
+#endif
+
+#ifndef uchar
+typedef unsigned char uchar;
+#endif
-typedef unsigned char uchar;
typedef std::pair<usint, usint> pair_type;
typedef std::pair<usint, usint> pair_type;
@@
-39,6
+49,11
@@
inline usint length(const pair_type& data)
return data.second + 1 - data.first;
}
return data.second + 1 - data.first;
}
+inline usint nextMultipleOf(usint multiplier, usint value)
+{
+ return multiplier * ((value / multiplier) + 1);
+}
+
const usint CHARS = ((usint)1 << CHAR_BIT);
const usint MEGABYTE = 1048576;
const usint CHARS = ((usint)1 << CHAR_BIT);
const usint MEGABYTE = 1048576;