-
-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathHashLib.inc
More file actions
77 lines (58 loc) · 2.45 KB
/
HashLib.inc
File metadata and controls
77 lines (58 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{ * ************************************************************************ * }
{ * HashLib Library * }
{ * Author - Ugochukwu Mmaduekwe * }
{ * Github Repository <https://github.com/Xor-el> * }
{ * * }
{ * Distributed under the MIT software license, see the accompanying file * }
{ * LICENSE * }
{ * or visit http://www.opensource.org/licenses/mit-license. * }
{ * * }
{ * ************************************************************************ * }
(* &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& *)
{========================= Compiler Specific Settings =========================}
{$IFDEF FPC}
{$I HashLibFPC.inc}
{$ELSE}
// Delphi 2010 and Above
{$IF CompilerVersion < 21.0}
{$MESSAGE ERROR 'This Library requires Delphi 2010 or higher.'}
{$IFEND}
{$DEFINE DELPHI}
{$DEFINITIONINFO ON} // Enable code browsing (Ctrl+Click)
{$STRINGCHECKS OFF}
{$WARN DUPLICATE_CTOR_DTOR OFF}
{$DEFINE HASHLIB_LITTLE_ENDIAN}
{$IFDEF CPUARM}
{$DEFINE HASHLIB_REQUIRES_PROPER_ALIGNMENT}
{$ENDIF}
{$DEFINE USE_UNROLLED_VARIANT}
{$IF CompilerVersion >= 25.0}
{$DEFINE SHIFT_OVERFLOW_BUG_FIXED}
{$IFEND}
{$IF CompilerVersion >= 28.0}
{$DEFINE HASHLIB_USE_PPL} // Use Parallel Programming Library
{$IFEND}
{$ENDIF}
{========================== Common Compiler Settings ==========================}
{$HINTS OFF}
{$WARNINGS OFF}
{$RANGECHECKS OFF}
{$OVERFLOWCHECKS OFF}
{$SCOPEDENUMS ON}
{$POINTERMATH ON}
{============================== SIMD Settings =================================}
{$IF DEFINED(CPUX86_64) OR DEFINED(CPUX64)}
{$DEFINE HASHLIB_X86_64}
{$IFEND}
{$IFDEF FPC}
{$IFDEF HASHLIB_X86_64}
{$DEFINE HASHLIB_AVX2_ASM_SUPPORTED}
{$ENDIF}
{$ENDIF}
// Uncomment ONE of the following to force a specific SIMD dispatch level:
// {$DEFINE HASHLIB_FORCE_SCALAR}
// {$DEFINE HASHLIB_FORCE_SSE2}
{$IF DEFINED(HASHLIB_FORCE_SCALAR) AND DEFINED(HASHLIB_FORCE_SSE2)}
{$MESSAGE ERROR 'HASHLIB_FORCE_SCALAR and HASHLIB_FORCE_SSE2 cannot both be defined. Enable only one.'}
{$IFEND}
(* &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& *)