- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if two short type integers add to store in Integers type,
i.e.in c/c++
int a[8];
short b[8];
short c[8];
int i;
for (i=0;i<8;i++)
a = b+;c
how to implement it with sse2 instruction?
becuase paddb, the result remain short type,
how to do the casting efficiently?
Thankyou~
Ivan
i.e.in c/c++
int a[8];
short b[8];
short c[8];
int i;
for (i=0;i<8;i++)
a = b+;c
how to implement it with sse2 instruction?
becuase paddb, the result remain short type,
how to do the casting efficiently?
Thankyou~
Ivan
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For simple loops such as this, the compiler should just be able to vectorize.
Build this app with -QaxW on windows and -axW on Linux.
(If you are using a Pentium 4. Substitute 'W' with a 'K' if you are using a Pentium III).
Please read the Intel Pentium 4 optimization guide at http://developer.intel.com/design/Pentium4/manuals/ for description of SSE2.
The Intel compiler links and documents can be accessed from http://www.intel.com/software/products/compilers.
Thanks,
Ganesh
Build this app with -QaxW on windows and -axW on Linux.
(If you are using a Pentium 4. Substitute 'W' with a 'K' if you are using a Pentium III).
Please read the Intel Pentium 4 optimization guide at http://developer.intel.com/design/Pentium4/manuals/ for description of SSE2.
The Intel compiler links and documents can be accessed from http://www.intel.com/software/products/compilers.
Thanks,
Ganesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also, welcome to the forum. Hope you are finding it useful.
Cheers!
Ganesh
Cheers!
Ganesh
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