From d806aab2c3119b904fa9115b8b553d86dc4c77fe Mon Sep 17 00:00:00 2001 From: jsteube Date: Mon, 3 Jul 2017 11:18:40 +0200 Subject: [PATCH] Remove some unused functions --- OpenCL/inc_common.cl | 1042 +----------------------------------------- 1 file changed, 6 insertions(+), 1036 deletions(-) diff --git a/OpenCL/inc_common.cl b/OpenCL/inc_common.cl index e66651488..d0bf65918 100644 --- a/OpenCL/inc_common.cl +++ b/OpenCL/inc_common.cl @@ -9,6 +9,9 @@ inline int ffz (const u32 v) { + #ifdef _unroll + #pragma unroll + #endif for (int i = 0; i < 32; i++) { if ((v >> i) & 1) continue; @@ -120,6 +123,9 @@ inline float get_entropy (const u32 *buf, const int elems) float entropy = 0.0; + #ifdef _unroll + #pragma unroll + #endif for (u32 c = 0; c < 256; c++) { const int r = count_char (buf, elems, c); @@ -2126,524 +2132,6 @@ inline void append_0x01_4x4 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], con w3[3] |= (offset >= 60) ? tmp : 0; } -inline void append_0x01_8x4 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const u32 offset) -{ - switch (offset) - { - case 0: - w0[0] = 0x01; - break; - - case 1: - w0[0] = w0[0] | 0x0100; - break; - - case 2: - w0[0] = w0[0] | 0x010000; - break; - - case 3: - w0[0] = w0[0] | 0x01000000; - break; - - case 4: - w0[1] = 0x01; - break; - - case 5: - w0[1] = w0[1] | 0x0100; - break; - - case 6: - w0[1] = w0[1] | 0x010000; - break; - - case 7: - w0[1] = w0[1] | 0x01000000; - break; - - case 8: - w0[2] = 0x01; - break; - - case 9: - w0[2] = w0[2] | 0x0100; - break; - - case 10: - w0[2] = w0[2] | 0x010000; - break; - - case 11: - w0[2] = w0[2] | 0x01000000; - break; - - case 12: - w0[3] = 0x01; - break; - - case 13: - w0[3] = w0[3] | 0x0100; - break; - - case 14: - w0[3] = w0[3] | 0x010000; - break; - - case 15: - w0[3] = w0[3] | 0x01000000; - break; - - case 16: - w1[0] = 0x01; - break; - - case 17: - w1[0] = w1[0] | 0x0100; - break; - - case 18: - w1[0] = w1[0] | 0x010000; - break; - - case 19: - w1[0] = w1[0] | 0x01000000; - break; - - case 20: - w1[1] = 0x01; - break; - - case 21: - w1[1] = w1[1] | 0x0100; - break; - - case 22: - w1[1] = w1[1] | 0x010000; - break; - - case 23: - w1[1] = w1[1] | 0x01000000; - break; - - case 24: - w1[2] = 0x01; - break; - - case 25: - w1[2] = w1[2] | 0x0100; - break; - - case 26: - w1[2] = w1[2] | 0x010000; - break; - - case 27: - w1[2] = w1[2] | 0x01000000; - break; - - case 28: - w1[3] = 0x01; - break; - - case 29: - w1[3] = w1[3] | 0x0100; - break; - - case 30: - w1[3] = w1[3] | 0x010000; - break; - - case 31: - w1[3] = w1[3] | 0x01000000; - break; - - case 32: - w2[0] = 0x01; - break; - - case 33: - w2[0] = w2[0] | 0x0100; - break; - - case 34: - w2[0] = w2[0] | 0x010000; - break; - - case 35: - w2[0] = w2[0] | 0x01000000; - break; - - case 36: - w2[1] = 0x01; - break; - - case 37: - w2[1] = w2[1] | 0x0100; - break; - - case 38: - w2[1] = w2[1] | 0x010000; - break; - - case 39: - w2[1] = w2[1] | 0x01000000; - break; - - case 40: - w2[2] = 0x01; - break; - - case 41: - w2[2] = w2[2] | 0x0100; - break; - - case 42: - w2[2] = w2[2] | 0x010000; - break; - - case 43: - w2[2] = w2[2] | 0x01000000; - break; - - case 44: - w2[3] = 0x01; - break; - - case 45: - w2[3] = w2[3] | 0x0100; - break; - - case 46: - w2[3] = w2[3] | 0x010000; - break; - - case 47: - w2[3] = w2[3] | 0x01000000; - break; - - case 48: - w3[0] = 0x01; - break; - - case 49: - w3[0] = w3[0] | 0x0100; - break; - - case 50: - w3[0] = w3[0] | 0x010000; - break; - - case 51: - w3[0] = w3[0] | 0x01000000; - break; - - case 52: - w3[1] = 0x01; - break; - - case 53: - w3[1] = w3[1] | 0x0100; - break; - - case 54: - w3[1] = w3[1] | 0x010000; - break; - - case 55: - w3[1] = w3[1] | 0x01000000; - break; - - case 56: - w3[2] = 0x01; - break; - - case 57: - w3[2] = w3[2] | 0x0100; - break; - - case 58: - w3[2] = w3[2] | 0x010000; - break; - - case 59: - w3[2] = w3[2] | 0x01000000; - break; - - case 60: - w3[3] = 0x01; - break; - - case 61: - w3[3] = w3[3] | 0x0100; - break; - - case 62: - w3[3] = w3[3] | 0x010000; - break; - - case 63: - w3[3] = w3[3] | 0x01000000; - break; - - case 64: - w4[0] = 0x01; - break; - - case 65: - w4[0] = w4[0] | 0x0100; - break; - - case 66: - w4[0] = w4[0] | 0x010000; - break; - - case 67: - w4[0] = w4[0] | 0x01000000; - break; - - case 68: - w4[1] = 0x01; - break; - - case 69: - w4[1] = w4[1] | 0x0100; - break; - - case 70: - w4[1] = w4[1] | 0x010000; - break; - - case 71: - w4[1] = w4[1] | 0x01000000; - break; - - case 72: - w4[2] = 0x01; - break; - - case 73: - w4[2] = w4[2] | 0x0100; - break; - - case 74: - w4[2] = w4[2] | 0x010000; - break; - - case 75: - w4[2] = w4[2] | 0x01000000; - break; - - case 76: - w4[3] = 0x01; - break; - - case 77: - w4[3] = w4[3] | 0x0100; - break; - - case 78: - w4[3] = w4[3] | 0x010000; - break; - - case 79: - w4[3] = w4[3] | 0x01000000; - break; - - case 80: - w5[0] = 0x01; - break; - - case 81: - w5[0] = w5[0] | 0x0100; - break; - - case 82: - w5[0] = w5[0] | 0x010000; - break; - - case 83: - w5[0] = w5[0] | 0x01000000; - break; - - case 84: - w5[1] = 0x01; - break; - - case 85: - w5[1] = w5[1] | 0x0100; - break; - - case 86: - w5[1] = w5[1] | 0x010000; - break; - - case 87: - w5[1] = w5[1] | 0x01000000; - break; - - case 88: - w5[2] = 0x01; - break; - - case 89: - w5[2] = w5[2] | 0x0100; - break; - - case 90: - w5[2] = w5[2] | 0x010000; - break; - - case 91: - w5[2] = w5[2] | 0x01000000; - break; - - case 92: - w5[3] = 0x01; - break; - - case 93: - w5[3] = w5[3] | 0x0100; - break; - - case 94: - w5[3] = w5[3] | 0x010000; - break; - - case 95: - w5[3] = w5[3] | 0x01000000; - break; - - case 96: - w6[0] = 0x01; - break; - - case 97: - w6[0] = w6[0] | 0x0100; - break; - - case 98: - w6[0] = w6[0] | 0x010000; - break; - - case 99: - w6[0] = w6[0] | 0x01000000; - break; - - case 100: - w6[1] = 0x01; - break; - - case 101: - w6[1] = w6[1] | 0x0100; - break; - - case 102: - w6[1] = w6[1] | 0x010000; - break; - - case 103: - w6[1] = w6[1] | 0x01000000; - break; - - case 104: - w6[2] = 0x01; - break; - - case 105: - w6[2] = w6[2] | 0x0100; - break; - - case 106: - w6[2] = w6[2] | 0x010000; - break; - - case 107: - w6[2] = w6[2] | 0x01000000; - break; - - case 108: - w6[3] = 0x01; - break; - - case 109: - w6[3] = w6[3] | 0x0100; - break; - - case 110: - w6[3] = w6[3] | 0x010000; - break; - - case 111: - w6[3] = w6[3] | 0x01000000; - break; - - case 112: - w7[0] = 0x01; - break; - - case 113: - w7[0] = w7[0] | 0x0100; - break; - - case 114: - w7[0] = w7[0] | 0x010000; - break; - - case 115: - w7[0] = w7[0] | 0x01000000; - break; - - case 116: - w7[1] = 0x01; - break; - - case 117: - w7[1] = w7[1] | 0x0100; - break; - - case 118: - w7[1] = w7[1] | 0x010000; - break; - - case 119: - w7[1] = w7[1] | 0x01000000; - break; - - case 120: - w7[2] = 0x01; - break; - - case 121: - w7[2] = w7[2] | 0x0100; - break; - - case 122: - w7[2] = w7[2] | 0x010000; - break; - - case 123: - w7[2] = w7[2] | 0x01000000; - break; - - case 124: - w7[3] = 0x01; - break; - - case 125: - w7[3] = w7[3] | 0x0100; - break; - - case 126: - w7[3] = w7[3] | 0x010000; - break; - - case 127: - w7[3] = w7[3] | 0x01000000; - break; - } -} - inline void append_0x02_1x4 (u32x w0[4], const u32 offset) { const u32 tmp = 0x02 << ((offset & 3) * 8); @@ -2708,524 +2196,6 @@ inline void append_0x02_4x4 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], con w3[3] |= (offset >= 60) ? tmp : 0; } -inline void append_0x02_8x4 (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u32x w4[4], u32x w5[4], u32x w6[4], u32x w7[4], const u32 offset) -{ - switch (offset) - { - case 0: - w0[0] = 0x02; - break; - - case 1: - w0[0] = w0[0] | 0x0200; - break; - - case 2: - w0[0] = w0[0] | 0x020000; - break; - - case 3: - w0[0] = w0[0] | 0x02000000; - break; - - case 4: - w0[1] = 0x02; - break; - - case 5: - w0[1] = w0[1] | 0x0200; - break; - - case 6: - w0[1] = w0[1] | 0x020000; - break; - - case 7: - w0[1] = w0[1] | 0x02000000; - break; - - case 8: - w0[2] = 0x02; - break; - - case 9: - w0[2] = w0[2] | 0x0200; - break; - - case 10: - w0[2] = w0[2] | 0x020000; - break; - - case 11: - w0[2] = w0[2] | 0x02000000; - break; - - case 12: - w0[3] = 0x02; - break; - - case 13: - w0[3] = w0[3] | 0x0200; - break; - - case 14: - w0[3] = w0[3] | 0x020000; - break; - - case 15: - w0[3] = w0[3] | 0x02000000; - break; - - case 16: - w1[0] = 0x02; - break; - - case 17: - w1[0] = w1[0] | 0x0200; - break; - - case 18: - w1[0] = w1[0] | 0x020000; - break; - - case 19: - w1[0] = w1[0] | 0x02000000; - break; - - case 20: - w1[1] = 0x02; - break; - - case 21: - w1[1] = w1[1] | 0x0200; - break; - - case 22: - w1[1] = w1[1] | 0x020000; - break; - - case 23: - w1[1] = w1[1] | 0x02000000; - break; - - case 24: - w1[2] = 0x02; - break; - - case 25: - w1[2] = w1[2] | 0x0200; - break; - - case 26: - w1[2] = w1[2] | 0x020000; - break; - - case 27: - w1[2] = w1[2] | 0x02000000; - break; - - case 28: - w1[3] = 0x02; - break; - - case 29: - w1[3] = w1[3] | 0x0200; - break; - - case 30: - w1[3] = w1[3] | 0x020000; - break; - - case 31: - w1[3] = w1[3] | 0x02000000; - break; - - case 32: - w2[0] = 0x02; - break; - - case 33: - w2[0] = w2[0] | 0x0200; - break; - - case 34: - w2[0] = w2[0] | 0x020000; - break; - - case 35: - w2[0] = w2[0] | 0x02000000; - break; - - case 36: - w2[1] = 0x02; - break; - - case 37: - w2[1] = w2[1] | 0x0200; - break; - - case 38: - w2[1] = w2[1] | 0x020000; - break; - - case 39: - w2[1] = w2[1] | 0x02000000; - break; - - case 40: - w2[2] = 0x02; - break; - - case 41: - w2[2] = w2[2] | 0x0200; - break; - - case 42: - w2[2] = w2[2] | 0x020000; - break; - - case 43: - w2[2] = w2[2] | 0x02000000; - break; - - case 44: - w2[3] = 0x02; - break; - - case 45: - w2[3] = w2[3] | 0x0200; - break; - - case 46: - w2[3] = w2[3] | 0x020000; - break; - - case 47: - w2[3] = w2[3] | 0x02000000; - break; - - case 48: - w3[0] = 0x02; - break; - - case 49: - w3[0] = w3[0] | 0x0200; - break; - - case 50: - w3[0] = w3[0] | 0x020000; - break; - - case 51: - w3[0] = w3[0] | 0x02000000; - break; - - case 52: - w3[1] = 0x02; - break; - - case 53: - w3[1] = w3[1] | 0x0200; - break; - - case 54: - w3[1] = w3[1] | 0x020000; - break; - - case 55: - w3[1] = w3[1] | 0x02000000; - break; - - case 56: - w3[2] = 0x02; - break; - - case 57: - w3[2] = w3[2] | 0x0200; - break; - - case 58: - w3[2] = w3[2] | 0x020000; - break; - - case 59: - w3[2] = w3[2] | 0x02000000; - break; - - case 60: - w3[3] = 0x02; - break; - - case 61: - w3[3] = w3[3] | 0x0200; - break; - - case 62: - w3[3] = w3[3] | 0x020000; - break; - - case 63: - w3[3] = w3[3] | 0x02000000; - break; - - case 64: - w4[0] = 0x02; - break; - - case 65: - w4[0] = w4[0] | 0x0200; - break; - - case 66: - w4[0] = w4[0] | 0x020000; - break; - - case 67: - w4[0] = w4[0] | 0x02000000; - break; - - case 68: - w4[1] = 0x02; - break; - - case 69: - w4[1] = w4[1] | 0x0200; - break; - - case 70: - w4[1] = w4[1] | 0x020000; - break; - - case 71: - w4[1] = w4[1] | 0x02000000; - break; - - case 72: - w4[2] = 0x02; - break; - - case 73: - w4[2] = w4[2] | 0x0200; - break; - - case 74: - w4[2] = w4[2] | 0x020000; - break; - - case 75: - w4[2] = w4[2] | 0x02000000; - break; - - case 76: - w4[3] = 0x02; - break; - - case 77: - w4[3] = w4[3] | 0x0200; - break; - - case 78: - w4[3] = w4[3] | 0x020000; - break; - - case 79: - w4[3] = w4[3] | 0x02000000; - break; - - case 80: - w5[0] = 0x02; - break; - - case 81: - w5[0] = w5[0] | 0x0200; - break; - - case 82: - w5[0] = w5[0] | 0x020000; - break; - - case 83: - w5[0] = w5[0] | 0x02000000; - break; - - case 84: - w5[1] = 0x02; - break; - - case 85: - w5[1] = w5[1] | 0x0200; - break; - - case 86: - w5[1] = w5[1] | 0x020000; - break; - - case 87: - w5[1] = w5[1] | 0x02000000; - break; - - case 88: - w5[2] = 0x02; - break; - - case 89: - w5[2] = w5[2] | 0x0200; - break; - - case 90: - w5[2] = w5[2] | 0x020000; - break; - - case 91: - w5[2] = w5[2] | 0x02000000; - break; - - case 92: - w5[3] = 0x02; - break; - - case 93: - w5[3] = w5[3] | 0x0200; - break; - - case 94: - w5[3] = w5[3] | 0x020000; - break; - - case 95: - w5[3] = w5[3] | 0x02000000; - break; - - case 96: - w6[0] = 0x02; - break; - - case 97: - w6[0] = w6[0] | 0x0200; - break; - - case 98: - w6[0] = w6[0] | 0x020000; - break; - - case 99: - w6[0] = w6[0] | 0x02000000; - break; - - case 100: - w6[1] = 0x02; - break; - - case 101: - w6[1] = w6[1] | 0x0200; - break; - - case 102: - w6[1] = w6[1] | 0x020000; - break; - - case 103: - w6[1] = w6[1] | 0x02000000; - break; - - case 104: - w6[2] = 0x02; - break; - - case 105: - w6[2] = w6[2] | 0x0200; - break; - - case 106: - w6[2] = w6[2] | 0x020000; - break; - - case 107: - w6[2] = w6[2] | 0x02000000; - break; - - case 108: - w6[3] = 0x02; - break; - - case 109: - w6[3] = w6[3] | 0x0200; - break; - - case 110: - w6[3] = w6[3] | 0x020000; - break; - - case 111: - w6[3] = w6[3] | 0x02000000; - break; - - case 112: - w7[0] = 0x02; - break; - - case 113: - w7[0] = w7[0] | 0x0200; - break; - - case 114: - w7[0] = w7[0] | 0x020000; - break; - - case 115: - w7[0] = w7[0] | 0x02000000; - break; - - case 116: - w7[1] = 0x02; - break; - - case 117: - w7[1] = w7[1] | 0x0200; - break; - - case 118: - w7[1] = w7[1] | 0x020000; - break; - - case 119: - w7[1] = w7[1] | 0x02000000; - break; - - case 120: - w7[2] = 0x02; - break; - - case 121: - w7[2] = w7[2] | 0x0200; - break; - - case 122: - w7[2] = w7[2] | 0x020000; - break; - - case 123: - w7[2] = w7[2] | 0x02000000; - break; - - case 124: - w7[3] = 0x02; - break; - - case 125: - w7[3] = w7[3] | 0x0200; - break; - - case 126: - w7[3] = w7[3] | 0x020000; - break; - - case 127: - w7[3] = w7[3] | 0x02000000; - break; - } -} - inline void append_0x80_1x4 (u32x w0[4], const u32 offset) { const u32 tmp = 0x80 << ((offset & 3) * 8);