- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using AVX and want to mplement a simple serial search. My code is like the following:
__m256 cmp = _mm256_load_ps(array);
__m256 keys = _mm256_broadcast_ss(key);
__m256 res= _mm256_cmp_ps(keys, cmp, 0);
int tmp = _mm256_movemask_ps(res);
switch (tmp) {
case 0: ind = 0;
case 1: ind = 1;
case 2: ind = 2;
case 4: ind = 3;
case 8: ind = 4;
......
}
I also tried lookup table, but they are both very slow. Any ideas to improve it? Thanks
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>...I also tried lookup table, but they are both very slow. Any ideas to improve it?
I recommend you to look at a latest version of Intel Optimization Manual ( 04.2012 ) at:
www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html
The Manual has a new chapter dedicated to string processing.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page