Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 06-23-2005, 10:33 AM   #1
Registered: Dec 2002
Location: Russia
Distribution: ASP linux
Posts: 94

Rep: Reputation: 15
Is it possible to use intel MMX/SSE/SSE2 with lookup tables?

Suppose I have a lookup table of small size (say 256 byte elements, i.e. uint8_t ltable[size]), and a byte array (uint8_t *array). I want to change each byte of array to the value in corresponding element of lookup table, i.e.
uint8_t *p;
for (p = array; p < array + array_size; p ++)
   *p = ltable [*p];
but in asm using mmx/sse/sse2 so that I could perform many lookups in the same time (instead of byte-granularity of the above C sample). Is it possible?
Old 06-24-2005, 04:30 AM   #2
Registered: Jan 2004
Location: Munich
Distribution: SuSE 9.2, 10.2, 10.3, knoppix
Posts: 276

Rep: Reputation: 31
I never used mmx or sse/2 myself, but why don't you download
and inspect the x86 (mmx, at least) instruction set yourself?

Old 06-24-2005, 04:50 AM   #3
Registered: Dec 2002
Location: Russia
Distribution: ASP linux
Posts: 94

Original Poster
Rep: Reputation: 15
Well, I already have. But there are no special instruction for parallel table lookup. So I asked - is it possible to do so using some tricks?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom color lookup tables per RGB in X Sergei Steshenko Linux - Software 4 05-31-2005 08:12 AM
Checking for SSE / SSE2 support drivingon9 Programming 7 11-14-2003 06:42 AM
FPU and SSE control word and processes proberts9999 Linux - General 0 08-20-2003 11:03 PM
AMD K6-2 vs Intel P233w/MMX bkeating Linux - Hardware 3 04-22-2003 08:51 PM
Want P4, SSE2 output from 386 GCC Wondre Programming 2 01-09-2003 12:03 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:21 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration