- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
I have a small query.
With GNU Compiler, I did wrote a program having a piece of code as belowwhich worked fine with GCC-v4.4 -
---
...
typedef double v2di __attribute__ ((vector_size(16)));
typedef float v4fi __attribute__ ((vector_size(16)));
...
more lines of code in btw.
..
v2di r[4];
....
---
but when I use Intel C++ Compiler(v-11.0 or v-10.0).
somewhere within the code where it has been used as data type, probably there is a mis-match between understanding of lvalue & rvalue by Intel C++ Compiler as above works fine with GNU Compiler, it gives an errors messages as -
--
error: expression must have arithmetic type
r[0] = pa[0] * pb[0];
^
--
Here, I guess that understanding of any Compiler for lvalue or rvalue are different OR Is the alignment as defined for GCC using typedef as above notcorrect to be used with ICC?
Any clue to resolve with ICC?
~BR
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As gcc-4.4 has good auto-vectorization capability, I would suggest standard C99 code for both gcc and icc, augmented by alignment attributes. If you don't like standard code, try the appropriate _mm_mul intrinsic.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page