Skip to content

Commit 54d27b1

Browse files
committed
Add template examples
Signed-off-by: Soumi Manna <[email protected]>
1 parent dde6a27 commit 54d27b1

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

clang/include/clang/Basic/AttrDocs.td

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2391,6 +2391,11 @@ the no-array ivdep's safelen, with the correspondent treatment by the backend.
23912391
[[intel::ivdep(a, 2)]] for (int i = 0; i != 10; ++i) { }
23922392
}
23932393

2394+
template<int N>
2395+
void bar() {
2396+
[[intel::ivdep(N)]] for(;;) { }
2397+
}
2398+
23942399
}];
23952400
}
23962401

@@ -2409,6 +2414,11 @@ applied multiple times to the same loop.
24092414
[[intel::ii(4)]] for (int i = 0; i < 10; ++i) var++;
24102415
}
24112416

2417+
template<int N>
2418+
void bar() {
2419+
[[intel::ii(N)]] for(;;) { }
2420+
}
2421+
24122422
}];
24132423
}
24142424

@@ -2428,6 +2438,11 @@ be applied multiple times to the same loop.
24282438
[[intel::max_concurrency(2)]] for (int i = 0; i != 10; ++i) a[i] = 0;
24292439
}
24302440

2441+
template<int N>
2442+
void bar() {
2443+
[[intel::max_concurrency(N)]] for(;;) { }
2444+
}
2445+
24312446
}];
24322447
}
24332448

@@ -2447,6 +2462,11 @@ of the nested loop levels should be coalesced.
24472462
[[intel::loop_coalesce]] for (int i = 0; i != 10; ++i) a[i] = 0;
24482463
}
24492464

2465+
template<int N>
2466+
void bar() {
2467+
[[intel::loop_coalesce(N)]] for(;;) { }
2468+
}
2469+
24502470
}];
24512471
}
24522472

@@ -2487,6 +2507,11 @@ used on the same loop in conjunction with disable_loop_pipelining.
24872507
[[intel::max_interleaving(4)]] for (int i = 0; i != 10; ++i) a[i] = 0;
24882508
}
24892509

2510+
template<int N>
2511+
void bar() {
2512+
[[intel::max_interleaving(N)]] for(;;) { }
2513+
}
2514+
24902515
}];
24912516
}
24922517

@@ -2507,6 +2532,11 @@ used on the same loop in conjunction with disable_loop_pipelining.
25072532
[[intel::speculated_iterations(4)]] for (int i = 0; i < 10; ++i) var++;
25082533
}
25092534

2535+
template<int N>
2536+
void bar() {
2537+
[[intel::speculated_iterations(N)]] for(;;) { }
2538+
}
2539+
25102540
}];
25112541
}
25122542

0 commit comments

Comments
 (0)