From ea7d9c50b66c8d0316f44cc45d546ce6862beea3 Mon Sep 17 00:00:00 2001 From: jsteube Date: Wed, 27 Mar 2019 11:38:49 +0100 Subject: [PATCH] Fix missing const keyword in some includes --- OpenCL/amp_a0.cl | 2 +- OpenCL/inc_rp.cl | 2 +- OpenCL/inc_rp.h | 2 +- OpenCL/inc_rp_optimized.cl | 4 ++-- OpenCL/inc_rp_optimized.h | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/OpenCL/amp_a0.cl b/OpenCL/amp_a0.cl index 58374dac3..2ae36b581 100644 --- a/OpenCL/amp_a0.cl +++ b/OpenCL/amp_a0.cl @@ -11,7 +11,7 @@ #include "inc_rp.cl" #endif -KERNEL_FQ void amp (GLOBAL_AS pw_t *pws, GLOBAL_AS pw_t *pws_amp, CONSTANT_AS kernel_rule_t *rules_buf, GLOBAL_AS const pw_t *combs_buf, GLOBAL_AS const bf_t *bfs_buf, const u32 combs_mode, const u64 gid_max) +KERNEL_FQ void amp (GLOBAL_AS pw_t *pws, GLOBAL_AS pw_t *pws_amp, CONSTANT_AS const kernel_rule_t *rules_buf, GLOBAL_AS const pw_t *combs_buf, GLOBAL_AS const bf_t *bfs_buf, const u32 combs_mode, const u64 gid_max) { const u64 gid = get_global_id (0); diff --git a/OpenCL/inc_rp.cl b/OpenCL/inc_rp.cl index 657e33000..98a6174b3 100644 --- a/OpenCL/inc_rp.cl +++ b/OpenCL/inc_rp.cl @@ -752,7 +752,7 @@ DECLSPEC int apply_rule (const u32 name, MAYBE_UNUSED const u8 p0, MAYBE_UNUSED return out_len; } -DECLSPEC int apply_rules (CONSTANT_AS u32 *cmds, u32 *buf, const int in_len) +DECLSPEC int apply_rules (CONSTANT_AS const u32 *cmds, u32 *buf, const int in_len) { int out_len = in_len; diff --git a/OpenCL/inc_rp.h b/OpenCL/inc_rp.h index ff097ebbe..c13d06e1f 100644 --- a/OpenCL/inc_rp.h +++ b/OpenCL/inc_rp.h @@ -117,6 +117,6 @@ DECLSPEC int mangle_dupeblock_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED cons DECLSPEC int mangle_dupeblock_last (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u8 *buf, const int len); DECLSPEC int mangle_title_sep (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int len); DECLSPEC int apply_rule (const u32 name, MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const u8 p1, u32 *buf, const int in_len); -DECLSPEC int apply_rules (CONSTANT_AS u32 *cmds, u32 *buf, const int in_len); +DECLSPEC int apply_rules (CONSTANT_AS const u32 *cmds, u32 *buf, const int in_len); #endif // _INC_RP_H diff --git a/OpenCL/inc_rp_optimized.cl b/OpenCL/inc_rp_optimized.cl index 8e974f8ce..e8095a44e 100644 --- a/OpenCL/inc_rp_optimized.cl +++ b/OpenCL/inc_rp_optimized.cl @@ -2357,7 +2357,7 @@ DECLSPEC u32 apply_rule_optimized (const u32 name, const u32 p0, const u32 p1, u return out_len; } -DECLSPEC u32 apply_rules_optimized (CONSTANT_AS u32 *cmds, u32 *buf0, u32 *buf1, const u32 len) +DECLSPEC u32 apply_rules_optimized (CONSTANT_AS const u32 *cmds, u32 *buf0, u32 *buf1, const u32 len) { u32 out_len = len; @@ -2375,7 +2375,7 @@ DECLSPEC u32 apply_rules_optimized (CONSTANT_AS u32 *cmds, u32 *buf0, u32 *buf1, return out_len; } -DECLSPEC u32x apply_rules_vect_optimized (const u32 *pw_buf0, const u32 *pw_buf1, const u32 pw_len, CONSTANT_AS kernel_rule_t *rules_buf, const u32 il_pos, u32x *buf0, u32x *buf1) +DECLSPEC u32x apply_rules_vect_optimized (const u32 *pw_buf0, const u32 *pw_buf1, const u32 pw_len, CONSTANT_AS const kernel_rule_t *rules_buf, const u32 il_pos, u32x *buf0, u32x *buf1) { #if VECT_SIZE == 1 diff --git a/OpenCL/inc_rp_optimized.h b/OpenCL/inc_rp_optimized.h index 1e0d6c562..c52113da0 100644 --- a/OpenCL/inc_rp_optimized.h +++ b/OpenCL/inc_rp_optimized.h @@ -122,7 +122,7 @@ DECLSPEC u32 rule_op_mangle_dupeblock_last (MAYBE_UNUSED const u32 p0, MAYBE_UNU DECLSPEC u32 toggle_on_register (const u32 in, const u32 r); DECLSPEC u32 rule_op_mangle_title_sep (MAYBE_UNUSED const u32 p0, MAYBE_UNUSED const u32 p1, MAYBE_UNUSED u32 *buf0, MAYBE_UNUSED u32 *buf1, const u32 in_len); DECLSPEC u32 apply_rule_optimized (const u32 name, const u32 p0, const u32 p1, u32 *buf0, u32 *buf1, const u32 in_len); -DECLSPEC u32 apply_rules_optimized (CONSTANT_AS u32 *cmds, u32 *buf0, u32 *buf1, const u32 len); -DECLSPEC u32x apply_rules_vect_optimized (const u32 *pw_buf0, const u32 *pw_buf1, const u32 pw_len, CONSTANT_AS kernel_rule_t *rules_buf, const u32 il_pos, u32x *buf0, u32x *buf1); +DECLSPEC u32 apply_rules_optimized (CONSTANT_AS const u32 *cmds, u32 *buf0, u32 *buf1, const u32 len); +DECLSPEC u32x apply_rules_vect_optimized (const u32 *pw_buf0, const u32 *pw_buf1, const u32 pw_len, CONSTANT_AS const kernel_rule_t *rules_buf, const u32 il_pos, u32x *buf0, u32x *buf1); #endif // _INC_RP_OPTIMIZED_H