| November 16, 2008 8:00 PM PST | |
Cause:
An array subscript may be too complicated for the compiler to decipher the memory access pattern.
>icl -c -Qvec-report2 t.cpp
Intel(R) C++ Compiler for applications running on Intel(R) 64, Version 12.0.0.063 Build 20100721
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
t.cpp
t.cpp(10) (col. 12): remark: loop was not vectorized: subscript too complex.
Resolution:
Try to write the subscripts as an explicit function of the main loop counter:
>icl -c -Qvec-report2 t2.cpp
Intel(R) C++ Compiler for applications running on Intel(R) 64, Version 12.0.0.063 Build 20100721
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
t2.cpp
t2.cpp(9) (col. 3): remark: LOOP WAS VECTORIZED.
An array subscript may be too complicated for the compiler to decipher the memory access pattern.
typedef int TTT[64];
TTT *a[4];
int foo(void) {
TTT *ref;
int x=0,y=0;
for (int k = 0; k < 64; k++) {
ref = a[k];
x += (*ref)[0];
}
return x;
}
>icl -c -Qvec-report2 t.cpp
Intel(R) C++ Compiler for applications running on Intel(R) 64, Version 12.0.0.063 Build 20100721
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
t.cpp
t.cpp(10) (col. 12): remark: loop was not vectorized: subscript too complex.
Resolution:
Try to write the subscripts as an explicit function of the main loop counter:
typedef int TTT[64];
TTT *a[4];
int foo(void) {
TTT *ref;
int x=0,y=0;
ref = a[0];
for (int k = 0; k < 64; k++) {
x += (*ref)[k];
}
return x;
}
>icl -c -Qvec-report2 t2.cpp
Intel(R) C++ Compiler for applications running on Intel(R) 64, Version 12.0.0.063 Build 20100721
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
t2.cpp
t2.cpp(9) (col. 3): remark: LOOP WAS VECTORIZED.
Do you need more help?
Thank you for your interest in this diagnostic message. We are still in the process of documenting this specific diagnostic.
Please let us know of your experience with this diagnostic message by posting a comment below. This will help us prioritize the order in which we document the diagnostics.
This article applies to: Intel® C++ Compiler for Linux* Knowledge Base, Intel® C++ Compiler for Mac OS X* Knowledge Base, Intel® C++ Compiler for Windows* Knowledge Base, Intel® Parallel Composer Knowledge Base
For more complete information about compiler optimizations, see our Optimization Notice.
Comments (0) 
Trackbacks (1)
-
Twitter Trackbacks for
Diagnostic 15019: loop was not vectorized: subscript too complex - Intel® Software Network
[intel.com]
on Topsy.com
October 19, 2010 12:21 PM PDT
Leave a comment 
To obtain technical support, please go to Software Support.
Author
Ganesh Rao (Intel)
| ||
Mark Sabahi (Intel)
|


