X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=incbwt%2Fmisc%2Fdefinitions.h;h=f62840061d50d19369337de09608002fe566ac92;hb=13e254b7c0ee22dffbc7c3125cee0408f9b375da;hp=4903af224213589c58f91209f51325c58faf05ab;hpb=40ddf9aca842bdc081b6350a4ebfe36b066c94c9;p=SXSI%2FTextCollection.git diff --git a/incbwt/misc/definitions.h b/incbwt/misc/definitions.h index 4903af2..f628400 100644 --- a/incbwt/misc/definitions.h +++ b/incbwt/misc/definitions.h @@ -5,6 +5,10 @@ #include +// #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 { @@ -17,8 +21,14 @@ typedef unsigned int usint; 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 pair_type; @@ -39,6 +49,11 @@ inline usint length(const pair_type& data) 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;