1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-07-07 15:18:15 +00:00
hashcat/OpenCL/inc_shared.h
Gabriele Gristina bcc351068f
Metal Backend:
- added support to 2D/3D Compute
- improved compute workloads calculation
Makefile:
- updated MACOSX_DEPLOYMENT_TARGET to 15.0
Unit tests:
- updated install_modules.sh with Crypt::Argon2

Argon2 start works with Apple Metal
2025-07-03 22:06:32 +02:00

67 lines
2.0 KiB
C

/**
* Author......: See docs/credits.txt
* License.....: MIT
*/
#ifndef INC_SHARED_H
#define INC_SHARED_H
#ifdef IS_METAL
#define KERN_ATTR_GPU_DECOMPRESS \
GLOBAL_AS pw_idx_t *pws_idx, \
GLOBAL_AS u32 *pws_comp, \
GLOBAL_AS pw_t *pws_buf, \
CONSTANT_AS const u64 &gid_max, \
uint3 hc_gid [[ thread_position_in_grid ]]
#define KERN_ATTR_GPU_MEMSET \
GLOBAL_AS uint4 *buf, \
CONSTANT_AS const u32 &value, \
CONSTANT_AS const u64 &gid_max, \
uint3 hc_gid [[ thread_position_in_grid ]]
#define KERN_ATTR_GPU_BZERO \
GLOBAL_AS uint4 *buf, \
CONSTANT_AS const u64 &gid_max, \
uint3 hc_gid [[ thread_position_in_grid ]]
#define KERN_ATTR_GPU_ATINIT \
GLOBAL_AS pw_t *buf, \
CONSTANT_AS const u64 &gid_max, \
uint3 hc_gid [[ thread_position_in_grid ]]
#define KERN_ATTR_GPU_UTF8_TO_UTF16 \
GLOBAL_AS pw_t *pws_buf, \
CONSTANT_AS const u64 &gid_max, \
uint3 hc_gid [[ thread_position_in_grid ]]
#else // CUDA, HIP, OpenCL
#define KERN_ATTR_GPU_DECOMPRESS \
GLOBAL_AS pw_idx_t *pws_idx, \
GLOBAL_AS u32 *pws_comp, \
GLOBAL_AS pw_t *pws_buf, \
const u64 gid_max
#define KERN_ATTR_GPU_MEMSET \
GLOBAL_AS uint4 *buf, \
const u32 value, \
const u64 gid_max
#define KERN_ATTR_GPU_BZERO \
GLOBAL_AS uint4 *buf, \
const u64 gid_max
#define KERN_ATTR_GPU_ATINIT \
GLOBAL_AS pw_t *buf, \
const u64 gid_max
#define KERN_ATTR_GPU_UTF8_TO_UTF16 \
GLOBAL_AS pw_t *pws_buf, \
const u64 gid_max
#endif // IS_METAL
#endif // INC_SHARED_H