lookup-tables

Junction between categories

旧街凉风 提交于 2021-01-29 11:27:35
问题 I am making a database for a freelance sign language interpreter. I have a subject table tblClient which holds information regarding the freelancer's clients. There is a lookup table tlkClient ClientType showing the various types of clients (categorized on condition -- deaf, deaf/blind, etc). There is also a table called tlkClient Modality. In this table are the different types of sign language offered by the interpreter. You can pick the client's preferred modality from the Client table. Now

Calculate a 32-bit CRC lookup table in C/C++

核能气质少年 提交于 2020-06-09 11:17:07
问题 I want to calculate a 32-bit CRC lookup table. One way I tried is by using the following code from this website: #include <iostream> #include <stdint.h> void make_crc_table() { unsigned long POLYNOMIAL = 0x04c11db7; unsigned long WIDTH = 8 * sizeof(unsigned long); unsigned long TOPBIT = 1 << (WIDTH - 1); unsigned long crcTable[256]; unsigned long remainder; // Compute the remainder of each possible dividend for (int dividend = 0; dividend < 256; ++dividend) { // Start with the dividend

Calculate a 32-bit CRC lookup table in C/C++

白昼怎懂夜的黑 提交于 2020-06-09 11:15:14
问题 I want to calculate a 32-bit CRC lookup table. One way I tried is by using the following code from this website: #include <iostream> #include <stdint.h> void make_crc_table() { unsigned long POLYNOMIAL = 0x04c11db7; unsigned long WIDTH = 8 * sizeof(unsigned long); unsigned long TOPBIT = 1 << (WIDTH - 1); unsigned long crcTable[256]; unsigned long remainder; // Compute the remainder of each possible dividend for (int dividend = 0; dividend < 256; ++dividend) { // Start with the dividend

How do I vectorize data_i16[0 to 15]?

南笙酒味 提交于 2020-05-23 21:07:48
问题 I'm on the Intel Intrinsic site and I can't figure out what combination of instructions I want. What I'd like to do is result = high_table[i8>>4] & low_table[i8&15] Where both table are 16bits (or more). shuffle seems like what I want (_mm_shuffle_epi8) however getting a 8bit value doesn't work for me. There doesn't seem to be a 16bit version and the non byte version seems to need the second param as an immediate value. How am I suppose to implement this? Do I call _mm_shuffle_epi8 twice for

How do I efficiently lookup 16bits in a 128bit SIMD vector? [duplicate]

耗尽温柔 提交于 2020-04-30 06:29:30
问题 This question already has answers here : SSE/SIMD shift with one-byte element size / granularity? (2 answers) How do I vectorize data_i16[0 to 15]? (1 answer) Closed 3 days ago . I'm trying to implement the strategy described in an answer to How do I vectorize data_i16[0 to 15]? Code below. The spot I'd like to fix is the for(int i=0; i<ALIGN; i++) loop I'm new to SIMD. From what I can tell I'd load the high/low nibble table by writing const auto HI_TBL = _mm_load_si128((__m128i*)HighNibble)

Array to lookup multiple columns and take another columns information

南笙酒味 提交于 2020-01-25 07:25:55
问题 I am trying to lookup a part number in a separate table array, the same value could be in multiple rows. The formula should find each instance of the value in the other table, move to a date column and determine which months the value exists in and which row it belongs to. The entire table B3:F15 should be automated. I have attached an image with proper explanation of what I am trying to accomplish if at all possible. The formulas would be entered into B3:F15. These are the cells where the