LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 06-23-2005, 09:33 AM   #1
shy
Member
 
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.
Code:
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, 03:30 AM   #2
Marius2
Member
 
Registered: Jan 2004
Location: Munich
Distribution: SuSE 9.2, 10.2, 10.3, knoppix
Posts: 274

Rep: Reputation: 30
I never used mmx or sse/2 myself, but why don't you download
http://www.intel.com/design/intarch/manuals/243191.htm
and inspect the x86 (mmx, at least) instruction set yourself?

HTH
 
Old 06-24-2005, 03:50 AM   #3
shy
Member
 
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?
 
  


Reply


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 07:12 AM
Checking for SSE / SSE2 support drivingon9 Programming 7 11-14-2003 05:42 AM
FPU and SSE control word and processes proberts9999 Linux - General 0 08-20-2003 10:03 PM
AMD K6-2 vs Intel P233w/MMX bkeating Linux - Hardware 3 04-22-2003 07:51 PM
Want P4, SSE2 output from 386 GCC Wondre Programming 2 01-09-2003 11:03 AM


All times are GMT -5. The time now is 01:41 AM.

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