1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-08-02 20:08:26 +00:00

fix HIPRTC_ERROR_COMPILATION: candidate function not viable: call to __host__ function from __device__ function

This commit is contained in:
Gabriele Gristina 2025-04-23 00:13:17 +02:00
parent 25af3a1c73
commit 06810bdbee
2 changed files with 14 additions and 14 deletions

View File

@ -28,7 +28,7 @@
#define PASTE_PW pw; #define PASTE_PW pw;
#endif #endif
CONSTANT_AS u8 s_lookup[128] = CONSTANT_VK u8 s_lookup[128] =
{ {
// 0-31: control characters (0) // 0-31: control characters (0)
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@ -53,32 +53,32 @@ CONSTANT_AS u8 s_lookup[128] =
0 0
}; };
HC_INLINE bool is_l (u8 c) DECLSPEC bool is_l (u8 c)
{ {
return (c >= 'a' && c <= 'z'); return (c >= 'a' && c <= 'z');
} }
HC_INLINE bool is_u (u8 c) DECLSPEC bool is_u (u8 c)
{ {
return (c >= 'A' && c <= 'Z'); return (c >= 'A' && c <= 'Z');
} }
HC_INLINE bool is_d (u8 c) DECLSPEC bool is_d (u8 c)
{ {
return (c >= '0' && c <= '9'); return (c >= '0' && c <= '9');
} }
HC_INLINE bool is_lh (u8 c) DECLSPEC bool is_lh (u8 c)
{ {
return (is_d (c) || (c >= 'a' && c <= 'f')); return (is_d (c) || (c >= 'a' && c <= 'f'));
} }
HC_INLINE bool is_uh (u8 c) DECLSPEC bool is_uh (u8 c)
{ {
return (is_d (c) || (c >= 'A' && c <= 'F')); return (is_d (c) || (c >= 'A' && c <= 'F'));
} }
HC_INLINE bool is_s (u8 c) DECLSPEC bool is_s (u8 c)
{ {
return s_lookup[c] == 1; return s_lookup[c] == 1;
} }

View File

@ -13,7 +13,7 @@
#define MAYBE_UNUSED #define MAYBE_UNUSED
#endif #endif
CONSTANT_AS u8 s_lookup_optimized[128] = CONSTANT_VK u8 s_lookup_optimized[128] =
{ {
// 0-31: control characters (0) // 0-31: control characters (0)
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@ -38,32 +38,32 @@ CONSTANT_AS u8 s_lookup_optimized[128] =
0 0
}; };
HC_INLINE bool is_l (u8 c) DECLSPEC bool is_l (u8 c)
{ {
return (c >= 'a' && c <= 'z'); return (c >= 'a' && c <= 'z');
} }
HC_INLINE bool is_u (u8 c) DECLSPEC bool is_u (u8 c)
{ {
return (c >= 'A' && c <= 'Z'); return (c >= 'A' && c <= 'Z');
} }
HC_INLINE bool is_d (u8 c) DECLSPEC bool is_d (u8 c)
{ {
return (c >= '0' && c <= '9'); return (c >= '0' && c <= '9');
} }
HC_INLINE bool is_lh (u8 c) DECLSPEC bool is_lh (u8 c)
{ {
return (is_d (c) || (c >= 'a' && c <= 'f')); return (is_d (c) || (c >= 'a' && c <= 'f'));
} }
HC_INLINE bool is_uh (u8 c) DECLSPEC bool is_uh (u8 c)
{ {
return (is_d (c) || (c >= 'A' && c <= 'F')); return (is_d (c) || (c >= 'A' && c <= 'F'));
} }
HC_INLINE bool is_s (u8 c) DECLSPEC bool is_s (u8 c)
{ {
return s_lookup_optimized[c] == 1; return s_lookup_optimized[c] == 1;
} }