From d37d26de74b709fd3c7d766ea723afef1c079ab8 Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Sat, 2 Nov 2024 00:21:33 +0100 Subject: [PATCH] Update s_lookup/s_lookup_optimized tables --- OpenCL/inc_rp.cl | 31 +++++++++++++++++++++---------- OpenCL/inc_rp_optimized.cl | 31 +++++++++++++++++++++---------- 2 files changed, 42 insertions(+), 20 deletions(-) diff --git a/OpenCL/inc_rp.cl b/OpenCL/inc_rp.cl index fc368f43c..1aaf579bc 100644 --- a/OpenCL/inc_rp.cl +++ b/OpenCL/inc_rp.cl @@ -30,16 +30,27 @@ CONSTANT_AS u8 s_lookup[128] = { - [0 ... 31] = 0, // control characters - [32] = 1, // whitespace - [33 ... 47] = 1, // from '!' to '/' - [48 ... 57] = 0, // digits - [58 ... 64] = 1, // from ':' to '@' - [65 ... 90] = 0, // uppercase - [91 ... 96] = 1, // from '[' to '`' - [97 ... 122] = 0, // lowercase - [123 ... 126] = 1, // from '{' to '~' - [127] = 0 // del + // 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, + // 32: whitespace (1) + 1, + // 33-47: punctuation (1) + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + // 48-57: digits (0) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // 58-64: punctuation (1) + 1, 1, 1, 1, 1, 1, 1, + // 65-90: uppercase letters (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, + // 91-96: punctuation (1) + 1, 1, 1, 1, 1, 1, + // 97-122: lowercase letters (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, + // 123-126: punctuation (1) + 1, 1, 1, 1, + // 127: DEL (0) + 0 }; HC_INLINE bool is_l (u8 c) diff --git a/OpenCL/inc_rp_optimized.cl b/OpenCL/inc_rp_optimized.cl index 5982ff9b0..19e6f5f1c 100644 --- a/OpenCL/inc_rp_optimized.cl +++ b/OpenCL/inc_rp_optimized.cl @@ -15,16 +15,27 @@ CONSTANT_AS u8 s_lookup_optimized[128] = { - [0 ... 31] = 0, // control characters - [32] = 1, // whitespace - [33 ... 47] = 1, // from '!' to '/' - [48 ... 57] = 0, // digits - [58 ... 64] = 1, // from ':' to '@' - [65 ... 90] = 0, // uppercase - [91 ... 96] = 1, // from '[' to '`' - [97 ... 122] = 0, // lowercase - [123 ... 126] = 1, // from '{' to '~' - [127] = 0 // del + // 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, + // 32: whitespace (1) + 1, + // 33-47: punctuation (1) + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + // 48-57: digits (0) + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // 58-64: punctuation (1) + 1, 1, 1, 1, 1, 1, 1, + // 65-90: uppercase letters (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, + // 91-96: punctuation (1) + 1, 1, 1, 1, 1, 1, + // 97-122: lowercase letters (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, + // 123-126: punctuation (1) + 1, 1, 1, 1, + // 127: DEL (0) + 0 }; HC_INLINE bool is_l (u8 c)