Merge pull request #2593 from Akury83/master
[RRG-proxmark3.git] / tools / hitag2crack / crack5opencl / ht2crack5opencl.h
blobcc2a1779837f56b645b8d65763c98b5f01ebaa9b
1 #ifndef HT2CRACK5OPENCL_H
2 #define HT2CRACK5OPENCL_H
4 #define VERSION "1.0"
6 // enable generic debug messages
7 #define DEBUGME 0
9 //#define DEBUG_HITAG2 0 // you can set this (1) to enable debug messages in hitag2 cpu code
11 #ifdef __APPLE__
13 #if defined(DEBUG_HITAG2) && DEBUG_HITAG2 == 1
14 #define OFF_FORMAT_U llu
15 #define OFF_FORMAT_X llx
16 #endif // DEBUG_HITAG2
18 #else // ! Apple
20 #if defined(DEBUG_HITAG2) && DEBUG_HITAG2 == 1
21 #define OFF_FORMAT_U lu
22 #define OFF_FORMAT_X lx
23 #endif // DEBUG_HITAG2
25 #endif // __APPLE__
27 #if defined(DEBUG_HITAG2) && DEBUG_HITAG2 == 1
28 #define STR_STRING(x) #x
29 #define STR(x) STR_STRING(x)
30 #endif // DEBUG_HITAG2
32 // some defines
33 #define APPLE_GPU_BROKEN 0 // if your Apple GPU is broken, try set to (1).
34 //#define MAX_OPENCL_DEVICES 16 // max number of concurrent devices (tested up to 4x RTX 3090)
35 #define GLOBAL_WS_1 1024 // default size of 2nd work-items dimension
36 #define GLOBAL_WS_2 1 // default size of 3rd work-items dimension
37 #define PROFILE_DEFAULT 2 // (0) is the best for Intel GPU's (NEO) and Apple GPU's (only Iris tested), (2) for all others. Some limitations are applyed later
38 #define TDEBUG 0 // (0) hide or (1) enable thread's debug messages
39 #define EXPERIMENTAL_RECOVERY 0 // untested work-unit recovery logic, in case of failure. supported only with THREAD_SCHEDULER_TYPE as (0)
40 //#define CLEAN_EXIT 1 // (1) seems to be fixed, but add a global cond_wait/cond_signal pair to make sure threads end before free memory maybe an idea
41 #define ENABLE_EMOJ 0 // only for fun
43 #define WGS_MATCHES_FACTOR_MID 1.41421 // Pythagoras, the square of 2, not full but probably good trade-off
44 #define WGS_MATCHES_FACTOR_FULL 3.14159265359 // Pi, maybe is the correct one
45 #define WGS_MATCHES_FACTOR WGS_MATCHES_FACTOR_MID // trying with Pythagoras, but if you got the following error, change to Pi: 'clEnqueueReadBuffer(matches) failed (-30)'
47 #endif // HT2CRACK5OPENCL_H