modified: myjupyterlab.sh
[GalaxyCodeBases.git] / BGI / BASE / src / 2bwt / TypeNLimit.h
blob9d0968ff45000f4b05fb2a56bf65d28c391785ae
1 /*
3 TypeNLimit.h Miscellaneous Constants
5 Copyright (C) 2004, Wong Chi Kwong.
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #ifndef __TYPENLIMIT_H__
24 #define __TYPENLIMIT_H__
26 #include <limits.h>
28 #define BITS_IN_WORD 32
29 #define BITS_IN_WORD_MINUS_1 31
30 #define BITS_IN_WORD_MASK 0x0000001F
31 #define BITS_IN_WORD_SHIFT 5
32 #define BITS_IN_HALF_WORD 16
33 #define BITS_IN_4_WORD 128
34 #define BITS_IN_4_WORD_MINUS_1 127
35 #define BITS_IN_4_WORD_SHIFT 7
36 #define FIRST_BIT_MASK 0x80000000
37 #define ALL_BUT_FIRST_BIT_MASK 0x7FFFFFFF
38 #define ALL_ONE_MASK 0xFFFFFFFF
39 #define ALL_ONE_MASK_64 0xFFFFFFFFFFFFFFFFLLU
40 #define FOUR_MULTIPLE_MASK 0xFFFFFFFC
41 #define BITS_IN_BYTE 8
42 #define BITS_IN_BYTE_SHIFT 3
43 #define BYTES_IN_WORD 4
45 #define TRUE 1
46 #define FALSE 0
48 // Compatibilities
50 #ifdef _WIN32
52 #define fopen64 fopen
53 #define ftello64 ftell
54 #define INLINE __inline
55 #define ALIGN_16 __declspec(align(16))
56 #define ALIGN_32 __declspec(align(32))
57 #define ALIGN_64 __declspec(align(64))
58 #define MEMALIGN(a, b) _aligned_malloc(a, b)
59 #define FREEALIGN(a) _aligned_free(a)
61 #else
63 #define fopen64 fopen
64 #define ftello64 ftell
65 #define INLINE __inline
66 #define ALIGN_16 __attribute__((aligned(16)))
67 #define ALIGN_32 __attribute__((aligned(32)))
68 #define ALIGN_64 __attribute__((aligned(64)))
69 #define MEMALIGN(a, b) _mm_malloc(a, b)
70 #define FREEALIGN(a) _mm_free(a)
72 #endif
74 // To make sure that LONG means 64 bit integer
75 #define LONG long long // For 32 & 64 bits compatibility on Windows and Linux
77 #define MAX_FILENAME_LEN 256
79 #endif