From d0e8e27cf1cd07b1e2caccbff3e1e754f7e1e708 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Thu, 10 Nov 2022 22:32:42 +0100 Subject: [PATCH] Fix function declaration of blake2b_init_vector_from_scalar() to use on Apple Metal --- OpenCL/inc_hash_blake2b.cl | 3 ++- OpenCL/inc_hash_blake2b.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/OpenCL/inc_hash_blake2b.cl b/OpenCL/inc_hash_blake2b.cl index 6b3bbe950..03a44b3ff 100644 --- a/OpenCL/inc_hash_blake2b.cl +++ b/OpenCL/inc_hash_blake2b.cl @@ -660,7 +660,8 @@ DECLSPEC void blake2b_init_vector (PRIVATE_AS blake2b_ctx_vector_t *ctx) ctx->len = 0; } -DECLSPEC void blake2b_init_vector_from_scalar(blake2b_ctx_vector_t* ctx, blake2b_ctx_t* ctx0) { +DECLSPEC void blake2b_init_vector_from_scalar (PRIVATE_AS blake2b_ctx_vector_t *ctx, PRIVATE_AS blake2b_ctx_t *ctx0) +{ ctx->h[0] = ctx0->h[0]; ctx->h[1] = ctx0->h[1]; ctx->h[2] = ctx0->h[2]; diff --git a/OpenCL/inc_hash_blake2b.h b/OpenCL/inc_hash_blake2b.h index d4cfb96d4..ed0ac923c 100644 --- a/OpenCL/inc_hash_blake2b.h +++ b/OpenCL/inc_hash_blake2b.h @@ -92,7 +92,7 @@ DECLSPEC void blake2b_final (PRIVATE_AS blake2b_ctx_t *ctx); DECLSPEC void blake2b_transform_vector (PRIVATE_AS u64x *h, PRIVATE_AS const u64x *m, const u32x len, const u64 f0); DECLSPEC void blake2b_init_vector (PRIVATE_AS blake2b_ctx_vector_t *ctx); -DECLSPEC void blake2b_init_vector_from_scalar(PRIVATE_AS blake2b_ctx_vector_t* ctx, PRIVATE_AS blake2b_ctx_t* ctx0); +DECLSPEC void blake2b_init_vector_from_scalar (PRIVATE_AS blake2b_ctx_vector_t *ctx, PRIVATE_AS blake2b_ctx_t *ctx0); DECLSPEC void blake2b_update_vector (PRIVATE_AS blake2b_ctx_vector_t *ctx, PRIVATE_AS const u32x *w, const int len); DECLSPEC void blake2b_final_vector (PRIVATE_AS blake2b_ctx_vector_t *ctx);