Hello,
The following code vectorlength.cpp does not compile with icc version 12.1.4
vectorlength.cpp(4): error: expression must have a constant value
#pragma simd vectorlength(m)
^
This is odd to me and is it difficult to enable this? Any workaround? Thanks!
Wei
===============================================
template <int m>
void foo(float *v, int n) {
#pragma simd vectorlength(m)
for (int i = 0; i < n; ++i) {
v[i] = v[i - m] + 1;
}
}
void bar(float *v, int n) {
foo(v, n);
}
pragma simd vectorlength does not take compile time constants?
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione




